Public Member Functions | Protected Member Functions | Private Types | Private Attributes
cop::AlgorithmSelector< T > Class Template Reference

Provides an interface for selecting an optmial algorithm. More...

#include <AlgorithmSelector.h>

Inheritance diagram for cop::AlgorithmSelector< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int AddAlgorithm (Algorithm< T > *alg, int nType, double dEval, double dTime)
 AlgorithmSelector ()
 AlgorithmSelector (XMLTag *node)
virtual Algorithm< T > * BestAlgorithm (int type, const Signature &sig, const std::vector< Sensor * > &sensors)
 Selects from a list the best algorithm.
std::vector< Algorithm< T > * > BestAlgorithmList (int type, const Signature &sig, const std::vector< Sensor * > &sensors)
 Selects all algorithm which are applicable.
int CountAlgorithms ()
virtual void EvalAlgorithm (Evaluable *alg, double eval, double time, Signature *relatedElemg)
const std::vector
< AlgorithmEval< T > > & 
GetAlgorithmList () const
void ReevaluatePose (Algorithm< T > *alg, RelPose *&pose)
XMLTagSave (std::string name="")
 ~AlgorithmSelector ()

Protected Member Functions

bool CheckTypeCompatibility (int listedType, int askedType)
Algorithm< T > * getAlgorithm (int index)
std::vector< AlgorithmEval< T > > & GetAlgorithmList (std::vector< AlgorithmEval< T > > *eval=NULL)
int InsertInList (AlgorithmEval< T > eval)
double ReEvalKernel (double val)

Private Types

typedef boost::mutex::scoped_lock lock

Private Attributes

std::vector< AlgorithmEval< T > > m_algorithmlist
boost::mutex * m_mutexAlgEval
int m_paAllocatedLength
int m_paDim
int m_paLength
ANNpointArray m_pointArray
double * m_pointEval
ANNkd_tree * m_tree

Detailed Description

template<typename T>
class cop::AlgorithmSelector< T >

Provides an interface for selecting an optmial algorithm.

class AlgorithmSelector

Definition at line 62 of file AlgorithmSelector.h.


Member Typedef Documentation

template<typename T>
typedef boost::mutex::scoped_lock cop::AlgorithmSelector< T >::lock [private]

Definition at line 190 of file AlgorithmSelector.h.


Constructor & Destructor Documentation

template<typename T>
cop::AlgorithmSelector< T >::AlgorithmSelector ( ) [inline]

Constructor

Definition at line 70 of file AlgorithmSelector.h.

template<typename T>
AlgorithmSelector::AlgorithmSelector ( XMLTag node)

Definition at line 6 of file AlgorithmSelector.hpp.

template<typename T>
cop::AlgorithmSelector< T >::~AlgorithmSelector ( ) [inline]

Empty Destructor

Definition at line 93 of file AlgorithmSelector.h.


Member Function Documentation

template<typename T>
int AlgorithmSelector::AddAlgorithm ( Algorithm< T > *  alg,
int  nType,
double  dEval,
double  dTime 
)

AddAlgorithm

Parameters:
algA pointer to a algorithm class
nTypethe algorithm type (e.g. )
dEval
Returns:
the index in the algorithm list

Definition at line 321 of file AlgorithmSelector.hpp.

template<typename T>
Algorithm< T > * AlgorithmSelector::BestAlgorithm ( int  type,
const Signature sig,
const std::vector< Sensor * > &  sensors 
) [virtual]

Selects from a list the best algorithm.

BestAlgorithm

Parameters:
typespecifies the type of algorithm that should be searched, normally a multiple of 0x100 modulo a special case
sigspecifies the signature that has to be searched
sensorsthe list of available sensors seeing the target region
Returns:
An algorithm with the highest score for the current situation

Definition at line 73 of file AlgorithmSelector.hpp.

template<typename T>
std::vector< Algorithm< T > * > AlgorithmSelector::BestAlgorithmList ( int  type,
const Signature sig,
const std::vector< Sensor * > &  sensors 
)

Selects all algorithm which are applicable.

BestAlgorithmList

Parameters:
typespecifies the type of algorithm that should be searched, normally a multiple of 0x100 modulo a special case
sigspecifies the signature that has to be searched
sensorsthe list of available sensors seeing the target region
Returns:
A list of algorithm with score greaer than 0

Definition at line 120 of file AlgorithmSelector.hpp.

template<typename T>
bool AlgorithmSelector::CheckTypeCompatibility ( int  listedType,
int  askedType 
) [protected]

test compatibility of an algorithm with a task

Definition at line 308 of file AlgorithmSelector.hpp.

template<typename T>
int cop::AlgorithmSelector< T >::CountAlgorithms ( ) [inline]

Return num of Algorithms in the visual finder

Definition at line 132 of file AlgorithmSelector.h.

template<typename T>
void AlgorithmSelector::EvalAlgorithm ( Evaluable alg,
double  eval,
double  time,
Signature relatedElemg 
) [virtual]

Replace the evaluatro interface function

TODO add position to ANN search tree, recalculate search tree

Implements cop::Evaluator.

Definition at line 170 of file AlgorithmSelector.hpp.

template<typename T>
Algorithm< T > * AlgorithmSelector::getAlgorithm ( int  index) [protected]

Get the value of m_algorithmlist

Returns:
the value of m_algorithmlist

Definition at line 66 of file AlgorithmSelector.hpp.

template<typename T>
const std::vector<AlgorithmEval<T> >& cop::AlgorithmSelector< T >::GetAlgorithmList ( ) const [inline]

Get the algorithm list

Definition at line 136 of file AlgorithmSelector.h.

template<typename T>
std::vector<AlgorithmEval<T> >& cop::AlgorithmSelector< T >::GetAlgorithmList ( std::vector< AlgorithmEval< T > > *  eval = NULL) [protected]

Get the algorithm list

template<typename T>
int AlgorithmSelector::InsertInList ( AlgorithmEval< T >  eval) [protected]

Insets in the list of a special type of algorithms

Definition at line 52 of file AlgorithmSelector.hpp.

template<typename T>
double AlgorithmSelector::ReEvalKernel ( double  val) [protected]

Helper for ReevaluatePose

Definition at line 259 of file AlgorithmSelector.hpp.

template<typename T>
void AlgorithmSelector::ReevaluatePose ( Algorithm< T > *  alg,
RelPose *&  pose 
)

Aposteriori evaulation of poses, if there were previous results with this algorithm at a similar position, to judge the reliability

Definition at line 265 of file AlgorithmSelector.hpp.

template<typename T>
XMLTag * AlgorithmSelector::Save ( std::string  name = "")

Save

Returns:
a XMLTag* that saves the evaluation of the algorithms and the algorithms themselves
Parameters:
namesets the name of the node returned

Definition at line 46 of file AlgorithmSelector.hpp.


Member Data Documentation

template<typename T>
std::vector<AlgorithmEval<T> > cop::AlgorithmSelector< T >::m_algorithmlist [private]

List of Algorithms, including their evaluation

Definition at line 178 of file AlgorithmSelector.h.

template<typename T>
boost::mutex* cop::AlgorithmSelector< T >::m_mutexAlgEval [private]

Definition at line 191 of file AlgorithmSelector.h.

template<typename T>
int cop::AlgorithmSelector< T >::m_paAllocatedLength [private]

Definition at line 187 of file AlgorithmSelector.h.

template<typename T>
int cop::AlgorithmSelector< T >::m_paDim [private]

Definition at line 188 of file AlgorithmSelector.h.

template<typename T>
int cop::AlgorithmSelector< T >::m_paLength [private]

Definition at line 186 of file AlgorithmSelector.h.

template<typename T>
ANNpointArray cop::AlgorithmSelector< T >::m_pointArray [private]

Definition at line 184 of file AlgorithmSelector.h.

template<typename T>
double* cop::AlgorithmSelector< T >::m_pointEval [private]

Definition at line 185 of file AlgorithmSelector.h.

template<typename T>
ANNkd_tree* cop::AlgorithmSelector< T >::m_tree [private]

Definition at line 183 of file AlgorithmSelector.h.


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


cognitive_perception
Author(s): Ulrich F Klank
autogenerated on Mon Oct 6 2014 10:48:46