|
Bridge++
Ver. 2.0.4
|
#include <sorter.h>
Classes | |
| struct | by_abs_ascend |
| absolute ascending order More... | |
| struct | by_abs_descend |
| absolute descending order More... | |
| struct | by_ascend |
| ascending order More... | |
| struct | by_descend |
| descending order More... | |
| struct | by_order |
| base class for sort ordering More... | |
| struct | proxy |
| proxy object to pass to stl sort algorithm More... | |
Public Member Functions | |
| Sorter (const std::string &type) | |
| constructor with sort ordering as a string arg More... | |
| virtual | ~Sorter () |
| destructor More... | |
| void | sort (std::vector< double > &v) |
| sort an array of values; v is sorted on exit. More... | |
| void | sort (std::vector< double > &v, const size_t nelem) |
| sort first n elements of an array of values; v is sorted on exit. More... | |
| std::vector< int > | sort_index (std::vector< double > &v) |
| sort an array and return list of index; v is sorted on exit. More... | |
| std::vector< int > | sort_index (std::vector< double > &v, const size_t nelem) |
| sort an array and return list of index. first n elemnts are considered. More... | |
| bool | comp (const double lhs, const double rhs) |
| call sort condition. More... | |
| Sorter (const std::string &type) | |
| virtual | ~Sorter () |
| void | sort (std::vector< T > &v) |
| sort an array of values; v is sorted on exit. More... | |
| void | sort (std::vector< T > &v, const size_t nelem) |
| sort first n elements of an array of values; v is sorted on exit. More... | |
| std::vector< int > | sort_index (std::vector< T > &v) |
| sort an array and return list of index; v is sorted on exit. More... | |
| std::vector< int > | sort_index (std::vector< T > &v, const size_t nelem) |
| sort an array and return list of index. first n elemnts are considered. More... | |
| bool | comp (const T &lhs, const T &rhs) |
| call sort condition. More... | |
Private Types | |
| typedef std::pair< int, double > | pair_t |
| typedef std::pair< int, T > | pair_t |
Private Member Functions | |
| Sorter (const Sorter &) | |
| Sorter & | operator= (const Sorter &) |
| Sorter (const Sorter &) | |
| Sorter & | operator= (const Sorter &) |
Private Attributes | |
| by_order * | m_order |
Definition at line 75 of file sorter_alt.h.
constructor with sort ordering as a string arg
Definition at line 98 of file sorter.cpp.
destructor
Definition at line 109 of file sorter.cpp.
| bool Sorter< T >::comp | ( | const double | lhs, |
| const double | rhs | ||
| ) |
call sort condition.
Definition at line 189 of file sorter.cpp.
| bool Sorter< T >::comp | ( | const T & | lhs, |
| const T & | rhs | ||
| ) |
call sort condition.
Definition at line 272 of file sorter_alt.h.
| void Sorter< T >::sort | ( | std::vector< double > & | v | ) |
sort an array of values; v is sorted on exit.
Definition at line 117 of file sorter.cpp.
| void Sorter< T >::sort | ( | std::vector< double > & | v, |
| const size_t | nelem | ||
| ) |
sort first n elements of an array of values; v is sorted on exit.
sort first n elments of an array of values; v is sorted on exit.
Definition at line 127 of file sorter.cpp.
| void Sorter< T >::sort | ( | std::vector< T > & | v | ) |
sort an array of values; v is sorted on exit.
Definition at line 196 of file sorter_alt.h.
| void Sorter< T >::sort | ( | std::vector< T > & | v, |
| const size_t | nelem | ||
| ) |
sort first n elements of an array of values; v is sorted on exit.
sort first n elments of an array of values; v is sorted on exit.
Definition at line 207 of file sorter_alt.h.
| std::vector< int > Sorter< T >::sort_index | ( | std::vector< double > & | v | ) |
sort an array and return list of index; v is sorted on exit.
sort an array and return list of index.
Definition at line 137 of file sorter.cpp.
| std::vector< int > Sorter< T >::sort_index | ( | std::vector< double > & | v, |
| const size_t | nelem | ||
| ) |
sort an array and return list of index. first n elemnts are considered.
sort an array and return list of index. first n elements are condidered.
Definition at line 163 of file sorter.cpp.
| std::vector< int > Sorter< T >::sort_index | ( | std::vector< T > & | v | ) |
sort an array and return list of index; v is sorted on exit.
sort an array and return list of index.
Definition at line 218 of file sorter_alt.h.
| std::vector< int > Sorter< T >::sort_index | ( | std::vector< T > & | v, |
| const size_t | nelem | ||
| ) |
sort an array and return list of index. first n elemnts are considered.
sort an array and return list of index. first n elements are condidered.
Definition at line 245 of file sorter_alt.h.