tlx
tlx::sort_networks::bose_nelson Namespace Reference

Implementation of Bose-Nelson 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 >
static void merge1_1 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length one and one More...
 
template<typename Iterator , typename CSwap >
static void merge1_2 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length one and two More...
 
template<typename Iterator , typename CSwap >
static void merge2_1 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length two and one More...
 
template<typename Iterator , typename CSwap >
static void merge2_2 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length two and two More...
 
template<typename Iterator , typename CSwap >
static void merge2_3 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length two and three More...
 
template<typename Iterator , typename CSwap >
static void merge3_2 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length three and two More...
 
template<typename Iterator , typename CSwap >
static void merge3_3 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length three and three More...
 
template<typename Iterator , typename CSwap >
static void merge3_4 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length three and four More...
 
template<typename Iterator , typename CSwap >
static void merge4_3 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length four and three More...
 
template<typename Iterator , typename CSwap >
static void merge4_4 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length four and four More...
 
template<typename Iterator , typename CSwap >
static void merge4_5 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length four and five More...
 
template<typename Iterator , typename CSwap >
static void merge5_5 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length five and five More...
 
template<typename Iterator , typename CSwap >
static void merge5_6 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length five and six More...
 
template<typename Iterator , typename CSwap >
static void merge6_6 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length six and six More...
 
template<typename Iterator , typename CSwap >
static void merge6_7 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length six and seven More...
 
template<typename Iterator , typename CSwap >
static void merge7_7 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length seven and seven More...
 
template<typename Iterator , typename CSwap >
static void merge7_8 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length seven and eight More...
 
template<typename Iterator , typename CSwap >
static void merge8_8 (Iterator a, Iterator b, CSwap cswap)
 merge network for element arrays length eight and eight More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort2 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for two elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort3 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for three elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort4 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for four elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort5 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for five elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort6 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for six elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort7 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for seven elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort8 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for eight elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort9 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for nine elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort10 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for ten elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort11 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for eleven elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort12 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for twelve elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort13 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for thirteen elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort14 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for fourteen elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort15 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson sorting network for fifteen elements. More...
 
template<typename Iterator , typename CSwap = DefaultCSwap<Iterator>>
static void sort16 (Iterator a, CSwap cswap=CSwap())
 Bose-Nelson 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 Bose-Network sorting network for up to sixteen elements with given comparison method. More...
 

Detailed Description

Implementation of Bose-Nelson 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 bose_nelson.hpp.

Function Documentation

static void tlx::sort_networks::bose_nelson::merge1_1 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length one and one

Definition at line 43 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge1_2 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length one and two

Definition at line 49 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge2_1 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length two and one

Definition at line 56 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge2_2 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length two and two

Definition at line 63 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge2_3 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length two and three

Definition at line 71 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge3_2 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length three and two

Definition at line 79 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge3_3 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length three and three

Definition at line 87 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge3_4 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length three and four

Definition at line 95 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge4_3 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length four and three

Definition at line 103 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge4_4 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length four and four

Definition at line 111 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge4_5 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length four and five

Definition at line 119 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge5_5 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length five and five

Definition at line 127 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge5_6 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length five and six

Definition at line 135 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge6_6 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length six and six

Definition at line 143 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge6_7 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length six and seven

Definition at line 151 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge7_7 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length seven and seven

Definition at line 159 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge7_8 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length seven and eight

Definition at line 167 of file bose_nelson.hpp.

static void tlx::sort_networks::bose_nelson::merge8_8 ( Iterator  a,
Iterator  b,
CSwap  cswap 
)
inlinestatic

merge network for element arrays length eight and eight

Definition at line 175 of file bose_nelson.hpp.

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

Call Bose-Network sorting network for up to sixteen elements with given comparison method.

Definition at line 306 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for ten elements.

Definition at line 246 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for eleven elements.

Definition at line 254 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for twelve elements.

Definition at line 262 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for thirteen elements.

Definition at line 270 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for fourteen elements.

Definition at line 278 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for fifteen elements.

Definition at line 286 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for sixteen elements.

Definition at line 294 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for two elements.

Definition at line 185 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for three elements.

Definition at line 191 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for four elements.

Definition at line 198 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for five elements.

Definition at line 206 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for six elements.

Definition at line 214 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for seven elements.

Definition at line 222 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for eight elements.

Definition at line 230 of file bose_nelson.hpp.

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

Bose-Nelson sorting network for nine elements.

Definition at line 238 of file bose_nelson.hpp.