LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lti::costFunction Class Reference

Base class for all cost functions. More...

#include <ltiCostFunction.h>

Inheritance diagram for lti::costFunction:

Inheritance graph
[legend]
Collaboration diagram for lti::costFunction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 costFunction ()
 costFunction (const costFunction &other)
virtual ~costFunction ()
virtual const char * getTypeName () const
costFunctioncopy (const costFunction &other)
costFunctionoperator= (const costFunction &other)
virtual void setSrc (const dmatrix &src, const ivector &srcIds)
virtual bool apply (const ivector &in, double &dist)
virtual double apply (const ivector &in)
virtual double apply (const std::list< int > &in)
virtual bool apply (const std::list< int > &in, double &value)=0

Protected Attributes

dmatrix pSrc
ivector pSrcIds

Detailed Description

Base class for all cost functions.

The cost functions are used to evaluate feature subsets of data sets. These cost functions are used by the feature selectors.


Constructor & Destructor Documentation

lti::costFunction::costFunction  ) 
 

default constructor

lti::costFunction::costFunction const costFunction other  ) 
 

copy constructor

Parameters:
other the object to be copied

virtual lti::costFunction::~costFunction  )  [virtual]
 

destructor


Member Function Documentation

virtual bool lti::costFunction::apply const std::list< int > &  in,
double &  value
[pure virtual]
 

computes the cost function with the given subset of features

Parameters:
in std::list with the features that should be inclueded for computing the function
value the result of the cost function
Returns:
true if apply successful or false otherwise.

Implemented in lti::bhattacharyyaDistOfSubset, lti::mahalanobisDistOfSubset, and lti::recognitionRateOfSubset.

virtual double lti::costFunction::apply const std::list< int > &  in  )  [virtual]
 

computes the cost function with the given subset of features

Parameters:
in std::list with the features that should be inclueded for computing the function
Returns:
the result of the cost function

virtual double lti::costFunction::apply const ivector in  )  [virtual]
 

computes the cost function with the given subset of features

Parameters:
in ivector with the features that should be included for computing the function
Returns:
the result of the cost function

virtual bool lti::costFunction::apply const ivector in,
double &  dist
[virtual]
 

computes the cost function with the given subset of features

Parameters:
in ivector with the features that should be included.
dist the result of the cost function.
Returns:
true if apply successful or false otherwise.

costFunction& lti::costFunction::copy const costFunction other  ) 
 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

virtual const char* lti::costFunction::getTypeName  )  const [virtual]
 

returns the name of this type ("costFunction")

Reimplemented from lti::functor.

Reimplemented in lti::bhattacharyyaDistOfSubset, lti::mahalanobisDistOfSubset, and lti::recognitionRateOfSubset.

costFunction& lti::costFunction::operator= const costFunction other  ) 
 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

virtual void lti::costFunction::setSrc const dmatrix src,
const ivector srcIds
[virtual]
 

Set the src data points and ids used for computation of the cost function.

Reimplemented in lti::bhattacharyyaDistOfSubset, lti::mahalanobisDistOfSubset, and lti::recognitionRateOfSubset.


Member Data Documentation

dmatrix lti::costFunction::pSrc [protected]
 

the source data points

ivector lti::costFunction::pSrcIds [protected]
 

the src ids corresponding to the data points


The documentation for this class was generated from the following file:
Generated on Thu Nov 24 16:31:20 2005 for LTI-Lib by Doxygen 1.4.4