test/radix_sort_test.cc
changeset 1130 0759d974de81
parent 1043 1bafdbd2fc46
child 1135 c199e9976d93
equal deleted inserted replaced
4:ae3c7e3ac6c0 5:4a51a2b94f6f
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2009
     5  * Copyright (C) 2003-2013
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
    50   return ai==a.end()&&bi==b.end();
    50   return ai==a.end()&&bi==b.end();
    51 }
    51 }
    52 
    52 
    53 template<class T>
    53 template<class T>
    54 T listsort(typename T::iterator b, typename T::iterator e)
    54 T listsort(typename T::iterator b, typename T::iterator e)
    55 { 
    55 {
    56   if(b==e) return T();
    56   if(b==e) return T();
    57   typename T::iterator bn=b;
    57   typename T::iterator bn=b;
    58   if(++bn==e) {
    58   if(++bn==e) {
    59     T l;
    59     T l;
    60     l.push_back(*b);
    60     l.push_back(*b);