last update 20 Sep 2009 |
#include <cvrDistanceFunctor.h>
Classes | |
class | parameters |
the parameters for the class distanceFunctor More... | |
Public Member Functions | |
distanceFunctor () | |
distanceFunctor (const distanceFunctor< T > &other) | |
virtual | ~distanceFunctor () |
virtual T | distance (const vector< T > &a, const vector< T > &b) const |
virtual T | distance (const matrix< T > &a, const matrix< T > &b) const |
virtual bool | apply (const vector< T > &a, const vector< T > &b, T &dist) const =0 |
virtual bool | apply (const matrix< T > &a, const matrix< T > &b, vector< T > &dists) const =0 |
virtual bool | apply (const matrix< T > &m, const vector< T > &v, vector< T > &dest) const =0 |
virtual bool | apply (const matrix< T > &a, const matrix< T > &b, T &dist) const =0 |
distanceFunctor< T > & | copy (const distanceFunctor< T > &other) |
virtual const std::string & | name () const |
virtual distanceFunctor< T > * | clone () const =0 |
virtual distanceFunctor< T > * | newInstance () const =0 |
const parameters & | getParameters () const |
cvr::distanceFunctor< T >::distanceFunctor | ( | ) |
default constructor
cvr::distanceFunctor< T >::distanceFunctor | ( | const distanceFunctor< T > & | other | ) |
virtual cvr::distanceFunctor< T >::~distanceFunctor | ( | ) | [virtual] |
destructor
virtual bool cvr::distanceFunctor< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b, | |||
T & | dist | |||
) | const [pure virtual] |
calculate something like the distance between the matrices a and b: both matrices are seen as vectors.
a | the first matrix<T> | |
b | the second matrix<T> | |
dist | the 'distance' between the matrices |
Implemented in cvr::euclideanDistanceFunctor< T >.
virtual bool cvr::distanceFunctor< T >::apply | ( | const matrix< T > & | m, | |
const vector< T > & | v, | |||
vector< T > & | dest | |||
) | const [pure virtual] |
Calculate the distance between each row or column of m depending on the value of rowWise and the vector v.
m | the matrix<T> | |
v | the vector to be compared with | |
dest | the vector with the distances to the vector v |
Implemented in cvr::euclideanDistanceFunctor< T >.
virtual bool cvr::distanceFunctor< T >::apply | ( | const matrix< T > & | a, | |
const matrix< T > & | b, | |||
vector< T > & | dists | |||
) | const [pure virtual] |
calculate the distances between the rows or columns of the matrices a and b, determined by the parameter rowWise.
a | the first vector<T> | |
b | the second vector<T> | |
dists | the distances between the matrices |
Implemented in cvr::euclideanDistanceFunctor< T >.
virtual bool cvr::distanceFunctor< T >::apply | ( | const vector< T > & | a, | |
const vector< T > & | b, | |||
T & | dist | |||
) | const [pure virtual] |
calculate the distance between the vectors a and b.
a | the first vector<T> | |
b | the second vector<T> | |
dist | the distance between the vectors |
Implemented in cvr::euclideanDistanceFunctor< T >.
virtual distanceFunctor<T>* cvr::distanceFunctor< T >::clone | ( | ) | const [pure virtual] |
returns a pointer to a clone of this functor.
Implements cvr::functor.
Implemented in cvr::euclideanDistanceFunctor< T >.
distanceFunctor<T>& cvr::distanceFunctor< T >::copy | ( | const distanceFunctor< T > & | other | ) |
virtual T cvr::distanceFunctor< T >::distance | ( | const matrix< T > & | a, | |
const matrix< T > & | b | |||
) | const [virtual] |
returns something like the distance between the matrices a and b: both matrices are seen as vectors.
This is a shortcut for apply(const matrix<T>&, const matrix<T>&, T&).
a | the first matrix<T> | |
b | the second matrix<T> |
virtual T cvr::distanceFunctor< T >::distance | ( | const vector< T > & | a, | |
const vector< T > & | b | |||
) | const [virtual] |
returns the distance between the vectors a and b.
This is a shortcut for apply(const vector<T>&, const vector<T>&, T&).
a | the first vector<T> | |
b | the second vector<T> |
const parameters& cvr::distanceFunctor< T >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from cvr::parametersManager.
Reimplemented in cvr::euclideanDistanceFunctor< T >.
virtual const std::string& cvr::distanceFunctor< T >::name | ( | ) | const [virtual] |
Return the name of the class.
Implements cvr::functor.
Reimplemented in cvr::euclideanDistanceFunctor< T >.
virtual distanceFunctor<T>* cvr::distanceFunctor< T >::newInstance | ( | ) | const [pure virtual] |
returns a pointer to a new instance of this functor.
Implements cvr::functor.
Implemented in cvr::euclideanDistanceFunctor< T >.