Dew MtxVec NET
TVec.SortDescend Methods
Summary
Sorts vector elements in descending order.

Class
TVec

Declaration
Function SortDescend(Index, Len: integer; IndexVec: TVec): TVec;

Description
Sort calling vector elements [Index]..[Index+Len-1]. An exception is raised if ConditionCheck is True and array borders are overrun. IndexVec contains the new order of elements.
Declaration
Function SortDescend(IndexVec: TVec): TVec;

Description
Sort all calling vector elements. IndexVec contains contains the new order of elements.
Declaration
Function SortDescend(Index, Len: integer): TVec;

Description
Sort calling vector elements [Index]..[Index+Len-1]. An exception is raised if ConditionCheck is True and array borders are overrun.
Declaration
Function SortDescend: TVec;

Description
Sort all calling vector elements in descending order.

Note: If the vector is complex, the complex values are first compared by the absolute value and then by the argument.

 See Also 
SortAscend 

Example 1

var a: TVec; begin CreateIt(a); try a.SetIt(True,[2,1,3,4]); a.SortDescend; // a = [4,3,2,1] finally FreeIt(a); end;

Copyright 2008 Dew Research
http://www.dewresearch.com