VF_sortindVD_sortindVE_sortind
VI_sortindVBI_sortindVSI_sortindVLI_sortindVQI_sortind
VU_sortindVUB_sortindVUS_sortindVUL_sortindVUI_sortind
FunctionSort 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/Delphiuses VFstd;
procedure VF_sortind( Ind:uiVector; X:fVector; size:UIntSize; dir:Integer );
DescriptionThe 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.
Error handlingnone
Return valuenone
See alsoVF_sort,   VF_indpick

VectorLib Table of Contents  OptiVec home