latest version v1.9 - last update 10 Apr 2010 |
Euclidean Similarity Measure. More...
#include <ltiEuclideanSimilarity.h>
Classes | |
class | parameters |
the parameters for the class similarityFunctor More... | |
Public Member Functions | |
euclideanSimilarity () | |
euclideanSimilarity (const euclideanSimilarity< T > &other) | |
virtual | ~euclideanSimilarity () |
virtual const char * | getTypeName () const |
T | apply (const vector< T > &a, const vector< T > &b) const |
T | apply (const matrix< T > &a, const matrix< T > &b) const |
vector< T > & | apply (const matrix< T > &a, const vector< T > &b, vector< T > &dest) const |
euclideanSimilarity & | copy (const euclideanSimilarity &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Euclidean Similarity Measure.
This class computes the similarity of two vectors or matrices by means of a measure based on the euclidean distance of the two vectors.
lti::euclideanSimilarity< T >::euclideanSimilarity | ( | ) |
default constructor
lti::euclideanSimilarity< T >::euclideanSimilarity | ( | const euclideanSimilarity< T > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::euclideanSimilarity< T >::~euclideanSimilarity | ( | ) | [virtual] |
destructor
vector<T>& lti::euclideanSimilarity< T >::apply | ( | const matrix< T > & | a, | |
const vector< T > & | b, | |||
vector< T > & | dest | |||
) | const |
Is not (yet) defined for matrices.
T lti::euclideanSimilarity< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b | |||
) | const [virtual] |
T lti::euclideanSimilarity< T >::apply | ( | const vector< T > & | a, | |
const vector< T > & | b | |||
) | const [virtual] |
calculates the a similarity of the vectors a and b based on their euclidean distance.
If both vectors have different sizes, the returned value will be negative!
a | the first vector<T> | |
b | the second vector<T> |
Implements lti::similarityFunctor< T >.
virtual functor* lti::euclideanSimilarity< T >::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
euclideanSimilarity& lti::euclideanSimilarity< T >::copy | ( | const euclideanSimilarity< T > & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::similarityFunctor< T >.
const parameters& lti::euclideanSimilarity< T >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::similarityFunctor< T >.
virtual const char* lti::euclideanSimilarity< T >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("l1Similarity")
Reimplemented from lti::similarityFunctor< T >.