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

lti::euclideanSimilarity< T > Class Template Reference

Euclidean Similarity Measure. More...

#include <ltiEuclideanSimilarity.h>

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

List of all members.

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
apply (const vector< T > &a, const vector< T > &b) const
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
euclideanSimilaritycopy (const euclideanSimilarity &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

template<class T>
class lti::euclideanSimilarity< T >

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.


Constructor & Destructor Documentation

template<class T>
lti::euclideanSimilarity< T >::euclideanSimilarity (  ) 

default constructor

template<class T>
lti::euclideanSimilarity< T >::euclideanSimilarity ( const euclideanSimilarity< T > &  other  ) 

copy constructor

Parameters:
other the object to be copied
template<class T>
virtual lti::euclideanSimilarity< T >::~euclideanSimilarity (  )  [virtual]

destructor


Member Function Documentation

template<class T>
vector<T>& lti::euclideanSimilarity< T >::apply ( const matrix< T > &  a,
const vector< T > &  b,
vector< T > &  dest 
) const

Is not (yet) defined for matrices.

Returns:
always null
template<class T>
T lti::euclideanSimilarity< T >::apply ( const matrix< T > &  a,
const matrix< T > &  b 
) const [virtual]

is not (yet) defined for matrices.

Returns:
always null

Implements lti::similarityFunctor< T >.

template<class T>
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!

Parameters:
a the first vector<T>
b the second vector<T>
Returns:
the cos2-type of similarity of a and b

Implements lti::similarityFunctor< T >.

template<class T>
virtual functor* lti::euclideanSimilarity< T >::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

template<class T>
euclideanSimilarity& lti::euclideanSimilarity< T >::copy ( const euclideanSimilarity< T > &  other  ) 

copy data of "other" functor.

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

Reimplemented from lti::similarityFunctor< T >.

template<class T>
const parameters& lti::euclideanSimilarity< T >::getParameters (  )  const

returns used parameters

Reimplemented from lti::similarityFunctor< T >.

template<class T>
virtual const char* lti::euclideanSimilarity< T >::getTypeName (  )  const [virtual]

returns the name of this type ("l1Similarity")

Reimplemented from lti::similarityFunctor< T >.


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

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