A sorter that sorts a sequence (e.g.
) with respect to a given input ordering (e.g. a base)
More...
#include <base_sorter.h>
List of all members.
Public Member Functions |
template<class InputIterator > |
| BaseSorter (unsigned int size, InputIterator begin, InputIterator end) |
| constructor
|
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
|
Additional Inherited Members |
| OrderedSorter (unsigned int size) |
| constructor for direct vector usage
|
| 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
|
Detailed Description
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
Constructor & Destructor Documentation
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 |
Member Function Documentation
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: