A sorter that sorts a sequence (e.g.
) with respect to a given input ordering (e.g. a base)
More...
#include <base_sorter.h>
|
template<class InputIterator > |
| BaseSorter (unsigned int size, InputIterator begin, InputIterator end) |
| constructor More...
|
|
bool | operator() (unsigned long a, unsigned long b) const |
| true iff a preceeds b in given sequence
|
|
|
template<class InputIterator > |
static void | fillOrder (InputIterator begin, InputIterator end, std::vector< unsigned long > &order) |
| constructs an ordering array More...
|
|
|
| OrderedSorter (unsigned int size) |
| constructor for direct vector usage More...
|
|
| OrderedSorter (std::vector< unsigned long > order) |
| constructor for reference use
|
|
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
|
|
A sorter that sorts a sequence (e.g.
) 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
◆ BaseSorter()
template<class InputIterator >
permlib::BaseSorter::BaseSorter |
( |
unsigned int |
size, |
|
|
InputIterator |
begin, |
|
|
InputIterator |
end |
|
) |
| |
|
inline |
constructor
- Parameters
-
size | size of sequence to be sorted |
begin | begin iterator for partial sequence that induces the ordering |
end | end iterator for partial sequence that induces the ordering |
◆ fillOrder()
template<class InputIterator >
static void permlib::BaseSorter::fillOrder |
( |
InputIterator |
begin, |
|
|
InputIterator |
end, |
|
|
std::vector< unsigned long > & |
order |
|
) |
| |
|
inlinestatic |
constructs an ordering array
- Parameters
-
begin | begin iterator for partial sequence that induces the ordering |
end | end iterator for partial sequence that induces the ordering |
order | vector to store the ordering array |
The documentation for this class was generated from the following file: