/// <summary> /// Generates a new vector with a unique IntensityMatrix. /// For transient plots, etc. since its not efficient to create a new matrix for every peak. /// </summary> public Vector(double[] values, IntensityMatrix.RowHeader row, IntensityMatrix.ColumnHeader[] cols) { double[,] valuesAsMatrix = VectorToMatrix(values); Source = new IntensityMatrix(new[] { row }, cols, valuesAsMatrix); RowIndex = 0; }
/// <summary> /// Finds two vectors and returns the value. /// </summary> internal double Find(Peak vector1Peak, GroupInfo vector1Group, Peak vector2Peak, GroupInfo vector2Group) { IntensityMatrix.RowHeader h1 = new IntensityMatrix.RowHeader(vector1Peak, vector1Group); IntensityMatrix.RowHeader h2 = new IntensityMatrix.RowHeader(vector2Peak, vector2Group); int i = ValueMatrix.FindIndex(h1); int j = ValueMatrix.FindIndex(h2); return(Values[i, j]); }