Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

template<class Type>
void Impala::Util::SelectionSort ( Type  data[],
int  left,
int  right 
)

Note:
right is inclusive

Definition at line 23 of file QuickSort.h.

References min.

Referenced by QuickSort().

00024 {
00025         for(int i=left ; i<right ; i++)
00026     {
00027                 int min = i;
00028                 for(int j=i+1 ; j<=right ; j++)
00029                         if(data[j] < data[min])
00030                 min = j;
00031                 Type temp = data[min];
00032                 data[min] = data[i];
00033                 data[i] = temp;
00034         }
00035 }


Generated on Fri Mar 19 11:39:11 2010 for ImpalaSrc by  doxygen 1.5.1