public void Set(T rowEntity, T columnEntity, double value) { if (!RowEntities.Contains(rowEntity) || !ColumnEntities.Contains(columnEntity)) { throw new ArgumentException(); } var i = RowEntities.IndexOf(rowEntity); var j = ColumnEntities.IndexOf(columnEntity); this[i, j] = value; }
public double Get(T rowEntity, T columnEntity) { if (!RowEntities.Contains(rowEntity) || !ColumnEntities.Contains(columnEntity)) { throw new ArgumentException(); } var i = RowEntities.IndexOf(rowEntity); var j = ColumnEntities.IndexOf(columnEntity); return(this[i, j]); }