permlib  0.2.9
Library for permutation computations
Public Member Functions | Static Public Member Functions | List of all members
permlib::BaseSorter Class Reference

A sorter that sorts a sequence (e.g. $\Omega$) with respect to a given input ordering (e.g. a base) More...

#include <base_sorter.h>

Inheritance diagram for permlib::BaseSorter:
permlib::OrderedSorter< std::vector< unsigned long > >

Public Member Functions

template<class InputIterator >
 BaseSorter (unsigned int size, InputIterator begin, InputIterator end)
 constructor More...
 
- Public Member Functions inherited from permlib::OrderedSorter< std::vector< unsigned long > >
bool operator() (unsigned long a, unsigned long b) const
 true iff a preceeds b in given sequence
 

Static Public Member Functions

template<class InputIterator >
static void fillOrder (InputIterator begin, InputIterator end, std::vector< unsigned long > &order)
 constructs an ordering array More...
 

Additional Inherited Members

- Protected Member Functions inherited from permlib::OrderedSorter< std::vector< unsigned long > >
 OrderedSorter (unsigned int size)
 constructor for direct vector usage More...
 
 OrderedSorter (std::vector< unsigned long > order)
 constructor for reference use
 
- Protected Attributes inherited from permlib::OrderedSorter< std::vector< unsigned long > >
unsigned int m_size
 size of domain which the order applies to
 
std::vector< unsigned long > m_order
 array which defines the order of points
 

Detailed Description

A sorter that sorts a sequence (e.g. $\Omega$) with respect to a given input ordering (e.g. a base)

note that copying (as it is implicitly done e.g. when used with std::sort) is expensive in this cases try BaseSorterByReference instead

Constructor & Destructor Documentation

◆ BaseSorter()

template<class InputIterator >
permlib::BaseSorter::BaseSorter ( unsigned int  size,
InputIterator  begin,
InputIterator  end 
)
inline

constructor

Parameters
sizesize of sequence to be sorted
beginbegin iterator for partial sequence that induces the ordering
endend iterator for partial sequence that induces the ordering

Member Function Documentation

◆ fillOrder()

template<class InputIterator >
static void permlib::BaseSorter::fillOrder ( InputIterator  begin,
InputIterator  end,
std::vector< unsigned long > &  order 
)
inlinestatic

constructs an ordering array

Parameters
beginbegin iterator for partial sequence that induces the ordering
endend iterator for partial sequence that induces the ordering
ordervector to store the ordering array

The documentation for this class was generated from the following file: