| VF_sortind | VD_sortind | VE_sortind |
| VI_sortind | VBI_sortind | VSI_sortind | VLI_sortind | VQI_sortind |
| VU_sortind | VUB_sortind | VUS_sortind | VUL_sortind | VUI_sortind |
|
| Function | Sort the index-array of a vector |
|
| Syntax C/C++ | #include <VFstd.h>
void VF_sortind( uiVector Ind, fVector X, ui size, int dir ); |
| C++ VecObj | #include <OptiVec.h>
void vector<ui>::sortind( const vector<T>& X, int dir=1 ); |
| Pascal/Delphi | uses VFstd;
procedure VF_sortind( Ind:uVector; X:fVector; size:UInt; dir:Integer ); |
|
| Description | The routine is similar to VF_sort, but this time it is the index-array of X rather than the vector X itself that is ordered. Ascending order is obtained by setting dir to any positive number. Here, ascending order means that Ind0 will contain the index of the smallest element of X, Ind1 the index of the second-smallest, and so on, up to Indsize-1, the index of the largest element in X. Descending order is obtained by setting dir negative. This routine is used if other vectors are correlated with X and the correlation of the individual elements has to be maintained. After sorting the index-array, use VF_indpick (VD_indpick, VI_indpick, etc.) to actually perform the sorting of X and the other vectors correlated with X. |
|
|
|
|