template<class Type, class CoType>
Definition at line 220 of file QuickSort.h. References max. Referenced by QuickSortDescCo(). 00221 { 00222 for(int i=left ; i<right ; i++) 00223 { 00224 int max = i; 00225 for(int j=i+1 ; j<=right ; j++) 00226 if(data[j] > data[max]) 00227 max = j; 00228 Type temp = data[max]; 00229 data[max] = data[i]; 00230 data[i] = temp; 00231 CoType coTemp = coData[max]; 00232 coData[max] = coData[i]; 00233 coData[i] = coTemp; 00234 } 00235 }
|