latest version v1.9 - last update 10 Apr 2010 |
This class is the base class for all functors which compute similarity measures between two vectors or matrices. More...
#include <ltiSimilarityFunctor.h>
Classes | |
class | parameters |
the parameters for the class similarityFunctor More... | |
Public Member Functions | |
similarityFunctor () | |
similarityFunctor (const similarityFunctor< T > &other) | |
virtual | ~similarityFunctor () |
virtual const char * | getTypeName () const |
virtual T | apply (const vector< T > &a, const vector< T > &b) const =0 |
virtual T | apply (const matrix< T > &a, const matrix< T > &b) const =0 |
similarityFunctor< T > & | copy (const similarityFunctor< T > &other) |
const parameters & | getParameters () const |
This class is the base class for all functors which compute similarity measures between two vectors or matrices.
It contains two apply functions, one for each type.
Be careful with the use of the parameters::rowWise. It indicates if the matrix should be considered as having row vectors (true) of columns vectors (false). Depending on that the computations will be very different.
lti::similarityFunctor< T >::similarityFunctor | ( | ) |
default constructor
lti::similarityFunctor< T >::similarityFunctor | ( | const similarityFunctor< T > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::similarityFunctor< T >::~similarityFunctor | ( | ) | [virtual] |
destructor
virtual T lti::similarityFunctor< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b | |||
) | const [pure virtual] |
calculate the similarity of the matrices a and b
a | the first matrix<T> | |
b | the second matrix<T> |
Implemented in lti::cosinus2Similarity< T >, and lti::euclideanSimilarity< T >.
virtual T lti::similarityFunctor< T >::apply | ( | const vector< T > & | a, | |
const vector< T > & | b | |||
) | const [pure virtual] |
calculate the similarity of the vectors a and b
a | the first vector<T> | |
b | the second vector<T> |
Implemented in lti::cosinus2Similarity< T >, and lti::euclideanSimilarity< T >.
similarityFunctor<T>& lti::similarityFunctor< T >::copy | ( | const similarityFunctor< T > & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::cosinus2Similarity< T >, and lti::euclideanSimilarity< T >.
const parameters& lti::similarityFunctor< T >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
Reimplemented in lti::euclideanSimilarity< T >.
virtual const char* lti::similarityFunctor< T >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("distanceFunctor")
Reimplemented from lti::linearAlgebraFunctor.
Reimplemented in lti::cosinus2Similarity< T >, and lti::euclideanSimilarity< T >.