- HasNan
- Transpose
- TransposeConjugate
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Compare
- CompareByDigits
- CompareEqual
- Flat
- Clip
- Reshape
- Resize
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
Sort
Sort a matrix or vector in place.
void vector::Sort(
|
Parameters
axis
[in] The axing along which to sort: 0 is horizontal, 1 is vertical.
func_name
[in] Comparator. You can specify one of the values of the ENUM_SORT_MODE enumeration or your own comparison function. If no function is specified, ascending sort is used.
A custom comparison function can be of two types:
- int comparator(T x1,T x2)
- int comparator(T x1,T x2,TContext context)
Here T is the type of matrix or vector, and TContex is the type of the 'context' variable which is passed as an additional parameter to the Sort method.
context
[in] Additional optional parameter that can be passed to a custom sort function.
Return Value
None. Sorting is performed in place, i.e. it is applied to the data of the matrix/vector for which the Sort method is called.
Example
//+------------------------------------------------------------------+
|