LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::sort< T >::parameters Class Reference

The parameters for the class sort. More...

#include <ltiSort.h>

Inheritance diagram for lti::sort< T >::parameters:
Inheritance graph
[legend]
Collaboration diagram for lti::sort< T >::parameters:
Collaboration graph
[legend]

List of all members.

Public Types

enum  eOrder { Ascending, Descending }

Public Member Functions

 parameters ()
 parameters (const parameters &other)
 ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
virtual functor::parametersclone () const
virtual bool read (ioHandler &handler, const bool complete=true)
virtual bool write (ioHandler &handler, const bool complete=true) const

Public Attributes

int thresholdForBubble
eOrder order

Detailed Description

template<class T>
class lti::sort< T >::parameters

The parameters for the class sort.


Member Enumeration Documentation

template<class T>
enum lti::sort::parameters::eOrder

Type used in the specification of the sorting order.

Enumerator:
Ascending 

ascending order

Descending 

descending order


Constructor & Destructor Documentation

template<class T>
lti::sort< T >::parameters::parameters ( void   )  [inline]
template<class T>
lti::sort< T >::parameters::parameters ( const parameters other  )  [inline]

Copy constructor.

Parameters:
other the parameters object to be copied

Reimplemented in lti::sort2< T, U >::parameters.

References lti::sort< T >::parameters::copy().

template<class T>
lti::sort< T >::parameters::~parameters (  )  [inline, virtual]

Destructor.

Reimplemented from lti::functor::parameters.

Reimplemented in lti::sort2< T, U >::parameters.


Member Function Documentation

template<class T>
virtual functor::parameters* lti::sort< T >::parameters::clone (  )  const [inline, virtual]

Returns a pointer to a clone of the parameters.

Implements lti::functor::parameters.

Reimplemented in lti::sort2< T, U >::parameters.

References lti::sort< T >::parameters::parameters().

template<class T>
parameters& lti::sort< T >::parameters::copy ( const parameters other  )  [inline]
template<class T>
const char* lti::sort< T >::parameters::getTypeName ( void   )  const [inline, virtual]

Returns name of this type.

Reimplemented from lti::functor::parameters.

Reimplemented in lti::sort2< T, U >::parameters.

template<class T>
virtual bool lti::sort< T >::parameters::read ( ioHandler handler,
const bool  complete = true 
) [inline, virtual]

Read the parameters from the given ioHandler.

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read.
Returns:
true if write was successful

Reimplemented from lti::functor::parameters.

Reimplemented in lti::sort2< T, U >::parameters.

References lti::sort< T >::parameters::Ascending, lti::sort< T >::parameters::Descending, lti::sort< T >::parameters::order, lti::ioHandler::readBegin(), lti::ioHandler::readEnd(), and lti::sort< T >::parameters::thresholdForBubble.

template<class T>
virtual bool lti::sort< T >::parameters::write ( ioHandler handler,
const bool  complete = true 
) const [inline, virtual]

Write the parameters in the given ioHandler.

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::functor::parameters.

Reimplemented in lti::sort2< T, U >::parameters.

References lti::sort< T >::parameters::Ascending, lti::sort< T >::parameters::order, lti::sort< T >::parameters::thresholdForBubble, lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().


Member Data Documentation

template<class T>
eOrder lti::sort< T >::parameters::order
template<class T>
int lti::sort< T >::parameters::thresholdForBubble

For vector/matrices with size smaller than this value, a bubble sort will be used (this way is faster)!

The default value is usually 10, but if you configured your system for performance this value could change.

The best value can be found in the ltiPerformanceConfig.h file, under _LTI_PERFORMANCE_SORT_STOP_QUICKSORT.

Default value: 10 or better.

Referenced by lti::sort< T >::parameters::copy(), lti::sort< T >::parameters::parameters(), lti::sort< T >::parameters::read(), and lti::sort< T >::parameters::write().


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

Generated on Sat Apr 10 15:28:44 2010 for LTI-Lib by Doxygen 1.6.1