/// <summary> /// Adds (multiple) series in form of a matrix. /// </summary> /// <param name="m">The matrix which contains the values.</param> public override void AddPoints(MatrixValue m) { if (m.IsVector) { AddSingleSeries(m); } else { if (m.DimensionX < m.DimensionY) { m = m.Transpose(); } //From here on m.DimensionX >= m.DimensionY ! for (var j = 1; j <= m.DimensionY; j++) { var vec = m.GetRowVector(j); AddSingleSeries(vec); } } }
public MatrixValue Function(MatrixValue m) { if (m.DimensionX == 1) { return GetVectorProd(m.GetColumnVector(1)); } else if (m.DimensionY == 1) { return GetVectorProd(m.GetRowVector(1)); } else { var M = new MatrixValue(m.DimensionY, m.DimensionX); for (var i = 1; i <= m.DimensionX; i++) { M.SetColumnVector(i, GetVectorProd(m.GetColumnVector(i))); } return M; } }
public Value Function(MatrixValue m) { if (m.DimensionX == 1) { return(GetVectorProduct(m.GetColumnVector(1))); } else if (m.DimensionY == 1) { return(GetVectorProduct(m.GetRowVector(1))); } else { var M = new MatrixValue(1, m.DimensionX); for (var i = 1; i <= m.DimensionX; i++) { M[1, i] = GetVectorProduct(m.GetColumnVector(i)); } return(M); } }
public Value Function(MatrixValue m) { if (m.DimensionX == 1) { return GetVectorSum(m.GetColumnVector(1)); } else if (m.DimensionY == 1) { return GetVectorSum(m.GetRowVector(1)); } else { var M = new MatrixValue(1, m.DimensionX); for (var i = 1; i <= m.DimensionX; i++) { M[1, i] = GetVectorSum(m.GetColumnVector(i)); } return M; } }
public MatrixValue Function(MatrixValue m) { if (m.DimensionX == 1) { return(GetVectorSum(m.GetColumnVector(1))); } else if (m.DimensionY == 1) { return(GetVectorSum(m.GetRowVector(1))); } else { var M = new MatrixValue(m.DimensionY, m.DimensionX); for (var i = 1; i <= m.DimensionX; i++) { M.SetColumnVector(i, GetVectorSum(m.GetColumnVector(i))); } return(M); } }