MatrixMathSubMatrixT(IROMatrixDouble, Int32, Boolean, FuncInt32, Int32, T) Method |
Gets a new submatrix, i.e. a matrix containing selected elements of the original matrix a.
Namespace: Altaxo.Calc.LinearAlgebraAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static T SubMatrix<T>(
this IROMatrix<double> a,
int[] selectedRows,
bool[] selectedColumns,
Func<int, int, T> MatrixGenerator
)
where T : Object, IMatrix<double>
Parameters
- a IROMatrixDouble
- The original matrix.
- selectedRows Int32
- Selected rows. The rows of the submatrix consist of all rows whose index is contained in selectedRows.
- selectedColumns Boolean
- Selected columns. The columns of the submatrix consist of all columns of the original matrix where selectedColumns[col] is true.
- MatrixGenerator FuncInt32, Int32, T
- Function to generate the returned matrix. 1st arg is the number of rows, 2nd arg the number of columns. The function have to generate a new matrix with the given number of rows and columns.
Type Parameters
- T
- Type of matrix to return.
Return Value
TThe submatrix containing selected elements of the original matrix
a.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IROMatrixDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also