Beispiel #1
0
 public Matrix(IList <string> xHeaders,
               IList <string> yHeaders,
               IEnumerable <IMatrixable <TValue> > items) :
     this(xHeaders, yHeaders)
 {
     foreach (var item in items)
     {
         var xHeaderIndex = XHeaders.IndexOf(item.XHeader);
         var yHeaderIndex = YHeaders.IndexOf(item.YHeader);
         Cells[xHeaderIndex][yHeaderIndex] = new Cell <TValue>(item.Value);
     }
 }
Beispiel #2
0
 public TValue ValueAt(string xHeader, string yHeader) =>
 Cells[XHeaders.IndexOf(xHeader)][YHeaders.IndexOf(yHeader)].Value;