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

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

Note:
right is inclusive

Definition at line 87 of file QuickSort.h.

References max.

Referenced by QuickSortDesc().

00088 {
00089         for(int i=left ; i<right ; i++)
00090     {
00091                 int max = i;
00092                 for(int j=i+1 ; j<=right ; j++)
00093                         if(data[j] > data[max])
00094                 max = j;
00095                 Type temp = data[max];
00096                 data[max] = data[i];
00097                 data[i] = temp;
00098         }
00099 }


Generated on Thu Jan 13 09:24:06 2011 for ImpalaSrc by  doxygen 1.5.1