Click or drag to resize

NMathFunctionsSortByColumn(FloatMatrix, Int32) Method

Sorts the rows of a matrix by the values in a specified column.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static FloatMatrix SortByColumn(
	FloatMatrix A,
	int col
)

Parameters

A  FloatMatrix
On input, the matrix to be sorted. On output, the sorted matrix.
col  Int32
Rows of the matrix will be sorted according to the values in this column of the matrix.

Return Value

FloatMatrix
A copy of the matrix A with rows sorted by according to the values in the column specifed by the column index col.
Remarks
During sorting NaN values are considered larger than everything else so that all rows that contain a NaN value in the column specified by col will appear at the bottom of the matrix.
See Also