tlx
tlx::sort_networks::best Namespace Reference

Implementation of best known sorting networks for up to sixteen elements. More...

Typedefs

template<typename Iterator >
using DefaultCSwap = CS_IfSwap< std::less< typename std::iterator_traits< Iterator >::value_type > >
 default conditional swap implementation More...
 

Functions

template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort2 (Iterator a, CSwap cswap=CSwap())
 sorting network for two elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort3 (Iterator a, CSwap cswap=CSwap())
 sorting network for three elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort4 (Iterator a, CSwap cswap=CSwap())
 sorting network for four elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort5 (Iterator a, CSwap cswap=CSwap())
 sorting network for five elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort6 (Iterator a, CSwap cswap=CSwap())
 sorting network for six elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort7 (Iterator a, CSwap cswap=CSwap())
 sorting network for seven elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort8 (Iterator a, CSwap cswap=CSwap())
 sorting network for eight elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort9 (Iterator a, CSwap cswap=CSwap())
 sorting network for nine elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort10 (Iterator a, CSwap cswap=CSwap())
 sorting network for ten elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort11 (Iterator a, CSwap cswap=CSwap())
 sorting network for eleven elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort12 (Iterator a, CSwap cswap=CSwap())
 sorting network for twelve elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort13 (Iterator a, CSwap cswap=CSwap())
 sorting network for thirteen elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort14 (Iterator a, CSwap cswap=CSwap())
 sorting network for fourteen elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort15 (Iterator a, CSwap cswap=CSwap())
 sorting network for fifteen elements More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort16 (Iterator a, CSwap cswap=CSwap())
 sorting network for sixteen elements More...
 
template<typename Iterator , typename Comparator = std::less<typename std::iterator_traits<Iterator>::value_type>>
static void sort (Iterator begin, Iterator end, Comparator cmp=Comparator())
 Call best known sorting network for up to sixteen elements with given comparison method. More...
 

Detailed Description

Implementation of best known sorting networks for up to sixteen elements.

Typedef Documentation

using DefaultCSwap = CS_IfSwap< std::less<typename std::iterator_traits<Iterator>::value_type> >

default conditional swap implementation

Definition at line 37 of file best.hpp.

Function Documentation

static void tlx::sort_networks::best::sort ( Iterator  begin,
Iterator  end,
Comparator  cmp = Comparator() 
)
static

Call best known sorting network for up to sixteen elements with given comparison method.

Definition at line 523 of file best.hpp.

static void tlx::sort_networks::best::sort10 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for ten elements

Definition at line 171 of file best.hpp.

static void tlx::sort_networks::best::sort11 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for eleven elements

Definition at line 205 of file best.hpp.

static void tlx::sort_networks::best::sort12 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for twelve elements

Definition at line 245 of file best.hpp.

static void tlx::sort_networks::best::sort13 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for thirteen elements

Definition at line 289 of file best.hpp.

static void tlx::sort_networks::best::sort14 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for fourteen elements

Definition at line 339 of file best.hpp.

static void tlx::sort_networks::best::sort15 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for fifteen elements

Definition at line 395 of file best.hpp.

static void tlx::sort_networks::best::sort16 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for sixteen elements

Definition at line 456 of file best.hpp.

static void tlx::sort_networks::best::sort2 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for two elements

Definition at line 41 of file best.hpp.

static void tlx::sort_networks::best::sort3 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for three elements

Definition at line 47 of file best.hpp.

static void tlx::sort_networks::best::sort4 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for four elements

Definition at line 55 of file best.hpp.

static void tlx::sort_networks::best::sort5 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for five elements

Definition at line 65 of file best.hpp.

static void tlx::sort_networks::best::sort6 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for six elements

Definition at line 79 of file best.hpp.

static void tlx::sort_networks::best::sort7 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for seven elements

Definition at line 96 of file best.hpp.

static void tlx::sort_networks::best::sort8 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for eight elements

Definition at line 117 of file best.hpp.

static void tlx::sort_networks::best::sort9 ( Iterator  a,
CSwap  cswap = CSwap() 
)
static

sorting network for nine elements

Definition at line 141 of file best.hpp.