public MatrixValue Function(MatrixValue M) { if (M.IsVector) { return(M.VectorSort()); } var result = new MatrixValue(); for (var i = 0; i < M.DimensionY; i++) { var vec = M.GetSubMatrix(i, i + 1, 0, M.DimensionX); vec = vec.VectorSort(); result = result.AddRow(vec); } return(result); }
public MatrixValue Function(MatrixValue M) { if (!M.IsVector) { var result = new MatrixValue(); for (var i = 0; i < M.DimensionY; i++) { var vec = M.GetSubMatrix(i, i + 1, 0, M.DimensionX); vec = vec.VectorSort(); result = result.AddRow(vec); } return result; } return M.VectorSort(); }