|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiSort.h>
Inheritance diagram for lti::sort< T >:


Public Member Functions | |
| sort (const bool &descendingOrder=false) | |
| sort (const parameters &par) | |
| sort (const sort< T > &other) | |
| virtual | ~sort () |
| virtual const char * | getTypeName () const |
| virtual bool | apply (matrix< T > &srcdest) const |
| virtual bool | apply (vector< T > &srcdest) const |
| virtual bool | apply (const matrix< T > &src, matrix< T > &dest) const |
| virtual bool | apply (const vector< T > &src, vector< T > &dest) const |
| sort & | copy (const sort &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
| bool | updateParameters () |
Classes | |
| class | parameters |
| The parameters for the class sort. More... | |
This class is used to sort the elements of a given vector or matrix.
The sort::parameters::order specify if the elements should be sorted in ascending or descending order.
This functor requires that the type T accept the operator<.
The quick-sort is not "stable", this means that elements with the same key value can change their positions in the vector.
You should also revise the STL algorithms std::sort() if you are using containers of the STL.
|
||||||||||
|
Default constructor.
|
|
||||||||||
|
Construct with given parameters.
|
|
||||||||||
|
Copy constructor.
|
|
|||||||||
|
Destructor.
|
|
||||||||||||||||
|
Operates on a copy of the given parameters.
|
|
||||||||||||||||
|
Sort all the elements of the matrix. The elements will be ordered row-wise. For example, the matrix at the left will be sorted into the matrix at the right side: | 2 8 3 | | 1 2 3 | | 1 4 5 | ---> | 4 5 6 | | 7 9 6 | | 7 8 9 |
|
|
||||||||||
|
Operates on the given parameter.
|
|
||||||||||
|
Sort all the elements of the matrix. The elements will be ordered row-wise. For example, the matrix at the left will be sorted into the matrix at the right side: | 2 8 3 | | 1 2 3 | | 1 4 5 | ---> | 4 5 6 | | 7 9 6 | | 7 8 9 |
|
|
|||||||||
|
Returns a pointer to a clone of this functor.
Implements lti::functor. Reimplemented in lti::sort2< T, U >. |
|
||||||||||
|
Copy data of "other" functor.
|
|
|||||||||
|
Returns used parameters.
Reimplemented from lti::functor. Reimplemented in lti::sort2< T, U >. |
|
|||||||||
|
Returns the name of this type ("sort").
Reimplemented from lti::functor. Reimplemented in lti::sort2< T, U >. |
|
|||||||||
|
Set parameters.
Reimplemented from lti::functor. |