lemon/radix_sort.h
changeset 2478 bf783151bc92
parent 2477 b5e1f017ff41
child 2479 221cfaf118a6
equal deleted inserted replaced
11:859fbd708c38 12:c770654b5678
   163     Value mask = ~0;
   163     Value mask = ~0;
   164     int max_digit = 0;
   164     int max_digit = 0;
   165 
   165 
   166     Iterator it;
   166     Iterator it;
   167     for (it = first; it != last; ++it) {
   167     for (it = first; it != last; ++it) {
   168       if (mask & functor(*it)) {
   168       while (mask & functor(*it)) {
   169 	++max_digit;
   169 	++max_digit;
   170 	mask <<= 1;
   170 	mask <<= 1;
   171       }
   171       }
   172     }
   172     }
   173     radixIntroSort(first, last, functor, 1 << max_digit);
   173     radixIntroSort(first, last, functor, 1 << max_digit);