MatrixInt::SortAscend Method

Overload List

#SignatureDescription
1TMtxVecInt *SortAscend(const int Index, const int Len) const;Sort calling vector elements [Index..Index+Len-1] in ascending order in-place.
2TMtxVecInt *SortAscend(TMtxVecInt *DstSortIdx, const int SortIdxIndex, const int Index, const int Len) const;Sort all calling vector elements in ascending order in-place.
3TMtxInt *SortAscend() const;Sorts the elements in a matrix row(s) in ascending order.
4TMtxInt *SortAscend(int Col) const;Performs row based sort in ascending order. The Col parameter defines the column based on which the rows are compared with each other.

Overload 1: TMtxVecInt *SortAscend(const int Index, const int Len) const;

Sort calling vector elements [Index..Index+Len-1] in ascending order in-place.

#NameTypeDescription
1Indexconst int
2Lenconst int
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 2: TMtxVecInt *SortAscend(TMtxVecInt *DstSortIdx, const int SortIdxIndex, const int Index, const int Len) const;

Sort all calling vector elements in ascending order in-place.

#NameTypeDescription
1DstSortIdxTMtxVecInt *After execution stores sorted values indices.
2SortIdxIndexconst intThe starting index for the DstSortIdx parameter.
3Indexconst intThe starting index at which to start the sort.
4Lenconst intThe number of elements to sort starting from including zero-based Index.

Returns: calling vector, storing sorted values.

Remarks:

Size of DstSortIdx and calling vector are adjusted automatically.

Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 3: TMtxInt *SortAscend() const;

Sorts the elements in a matrix row(s) in ascending order.

Remarks:

Sorts the elements in calling matrix row(s) in ascending order in-place. If the calling matrix is complex, then complex values are first compared by the absolute value and then by the argument.

Note
Each row is sorted independently from the other.

See Also: MatrixInt::SortDescend
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 4: TMtxInt *SortAscend(int Col) const;

Performs row based sort in ascending order. The Col parameter defines the column based on which the rows are compared with each other.

#NameTypeDescription
1Colint
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler