Matrix.SortDescend Method

Overload List

#SignatureDescription
1function SortDescend: TMtx;Sorts the elements in a matrix row(s) in descending order.
2function SortDescend(Col: Integer): TMtx;Performs row based sort in descending order. The Col parameter defines the column based on which the rows are compared with each other.

Overload 1: function SortDescend: TMtx;

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

Result: stored in self (calling object), returns self for chaining

Remarks:

Sorts the elements in calling matrix row(s) in descending 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.

Examples
var  A: Matrix;
begin
    A.SetIt(2,2,False,[1,2,
        4,2]);
    A.SortDescend;
    // A becomes:
    // [2,1]
    // [4,2]
end;
See Also: Matrix.SortAscend

Overload 2: function SortDescend(Col: Integer): TMtx;

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

#NameTypeDescription
1ColInteger

Result: stored in self (calling object), returns self for chaining