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 indexarray 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:uiVector; X:fVector; size:UIntSize; dir:Integer ); 

Description  The routine is similar to VF_sort, but this time it is the indexarray 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 Ind_{0} will contain the index of the smallest element of X, Ind_{1} the index of the secondsmallest, and so on, up to Ind_{size1}, 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 indexarray, use VF_indpick (VD_indpick, VI_indpick, etc.) to actually perform the sorting of X and the other vectors correlated with X. 



