- HasNan
- ReplaceNan
- ReplaceToZero
- NormalizeDouble
- Transpose
- TransposeConjugate
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Swap
- Conjugate
- Concat
- Compare
- CompareByDigits
- CompareEqual
- Flat
- Clip
- Reshape
- Resize
- Free
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
Sort
Sort a matrix or vector in place.
bool vector::Sort(
|
Parameters
axis
[in] Axis along which to sort. Set using a value of the ENUM_MATRIX_AXIS enumeration: AXIS_HORZ — sort horizontal elements, AXIS_VERT — sort vertical elements, or AXIS_NONE - sort all elements.
mode
[in] Sorting direction, ENUM_SORT_MODE::SORT_ASCENDING or ENUM_SORT_MODE::SORT_DESCENDING.
Return Value
Returns true on success; otherwise false, for example, if an invalid parameter is passed or the vector/matrix is empty.
Note
Sorting is performed in place — it is applied to the data of the matrix/vector for which the Sort method is called.
Example:
//+------------------------------------------------------------------+
|