14 #ifndef TLX_SORT_NETWORKS_BEST_HEADER 15 #define TLX_SORT_NETWORKS_BEST_HEADER 24 namespace sort_networks {
35 template <
typename Iterator>
37 std::less<typename std::iterator_traits<Iterator>::value_type> >;
40 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
41 static void sort2(Iterator a, CSwap cswap = CSwap()) {
46 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
47 static void sort3(Iterator a, CSwap cswap = CSwap()) {
54 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
55 static void sort4(Iterator a, CSwap cswap = CSwap()) {
64 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
65 static void sort5(Iterator a, CSwap cswap = CSwap()) {
78 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
79 static void sort6(Iterator a, CSwap cswap = CSwap()) {
95 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
96 static void sort7(Iterator a, CSwap cswap = CSwap()) {
116 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
117 static void sort8(Iterator a, CSwap cswap = CSwap()) {
140 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
141 static void sort9(Iterator a, CSwap cswap = CSwap()) {
170 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
171 static void sort10(Iterator a, CSwap cswap = CSwap()) {
204 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
205 static void sort11(Iterator a, CSwap cswap = CSwap()) {
244 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
245 static void sort12(Iterator a, CSwap cswap = CSwap()) {
288 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
289 static void sort13(Iterator a, CSwap cswap = CSwap()) {
338 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
339 static void sort14(Iterator a, CSwap cswap = CSwap()) {
394 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
395 static void sort15(Iterator a, CSwap cswap = CSwap()) {
455 template <
typename Iterator,
typename CSwap = DefaultCSwap<Iterator> >
456 static void sort16(Iterator a, CSwap cswap = CSwap()) {
521 template <
typename Iterator,
typename Comparator =
522 std::less<typename std::iterator_traits<Iterator>::value_type> >
523 static void sort(Iterator begin, Iterator end, Comparator cmp = Comparator()) {
526 switch (end - begin) {
592 #endif // !TLX_SORT_NETWORKS_BEST_HEADER
static void sort4(Iterator a, CSwap cswap=CSwap())
sorting network for four elements
static void sort13(Iterator a, CSwap cswap=CSwap())
sorting network for thirteen elements
static void sort9(Iterator a, CSwap cswap=CSwap())
sorting network for nine elements
static void sort16(Iterator a, CSwap cswap=CSwap())
sorting network for sixteen elements
static void sort10(Iterator a, CSwap cswap=CSwap())
sorting network for ten elements
Conditional swap implementation used for sorting networks: trivial portable C++ implementation with c...
static void sort8(Iterator a, CSwap cswap=CSwap())
sorting network for eight elements
static void sort(Iterator begin, Iterator end, Comparator cmp=Comparator())
Call best known sorting network for up to sixteen elements with given comparison method.
static void sort7(Iterator a, CSwap cswap=CSwap())
sorting network for seven elements
static void sort3(Iterator a, CSwap cswap=CSwap())
sorting network for three elements
static void sort15(Iterator a, CSwap cswap=CSwap())
sorting network for fifteen elements
static void sort11(Iterator a, CSwap cswap=CSwap())
sorting network for eleven elements
static void sort12(Iterator a, CSwap cswap=CSwap())
sorting network for twelve elements
static void sort2(Iterator a, CSwap cswap=CSwap())
sorting network for two elements
static void sort6(Iterator a, CSwap cswap=CSwap())
sorting network for six elements
static void sort14(Iterator a, CSwap cswap=CSwap())
sorting network for fourteen elements
static void sort5(Iterator a, CSwap cswap=CSwap())
sorting network for five elements