Click or drag to resize

MatrixMathSubMatrixT(IROMatrixDouble, Boolean, Int32, FuncInt32, Int32, T) Method

Gets a new submatrix, i.e. a matrix containing selected elements of the original matrix a.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static T SubMatrix<T>(
	this IROMatrix<double> a,
	bool[] selectedRows,
	int selectedColumn,
	Func<int, int, T> MatrixGenerator
)
where T : Object, IMatrix<double>

Parameters

a  IROMatrixDouble
The original matrix.
selectedRows  Boolean
Selected rows. The rows of the submatrix consist of all rows of the original matrix where selectedRows[row] is true.
selectedColumn  Int32
Selected column. The submatrix consists of one column, whose values originate from the original matrix selectedColumn.
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

T
The 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