tlx
Loading...
Searching...
No Matches
bose_nelson.hpp File Reference
#include <tlx/sort/networks/cswap.hpp>
#include <functional>

Go to the source code of this file.

Namespaces

namespace  tlx
 
namespace  tlx::sort_networks
 Implementations of sorting networks for up to sixteen elements.
 
namespace  tlx::sort_networks::bose_nelson
 Implementation of Bose-Nelson sorting networks for up to sixteen elements.
 

Typedefs

template<typename Iterator >
using DefaultCSwap
 default conditional swap implementation
 

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