last update 20 Sep 2009 |
#include <cvrDistanceType.h>
Public Types | |
typedef distanceType< typename T::value_type >::distance_type | distance_type |
typedef distanceType< typename T::value_type > ::square_distance_type | square_distance_type |
typedef distanceType< typename T::value_type > ::fp_distance_type | fp_distance_type |
These can be simple types like int
or double
or lti
types like vector<T>
, rgbaPixel, etc. There are three different distance types:
distance_type
is used when a simple distance is calculated between two instances of T which does not involve accumulation of squares or typical floating point operations.square_distance_type
is used for the result of distances that involve the square of the type T.fp_distance_type
is used for distances that involve floating point operations such as the sqrt or log functions. typedef distanceType<typename T::value_type>::distance_type cvr::distanceType< T >::distance_type |
Suggested distance type for distances that use simple accumulation of type elements (for example l1Distantor).
typedef distanceType<typename T::value_type>::fp_distance_type cvr::distanceType< T >::fp_distance_type |
Suggested distance type for distances that use accumulation of type elements or their squares and use a typical floating point (fp) operation like sqrt or log on that.
(for example l2Distantor).
typedef distanceType<typename T::value_type>::square_distance_type cvr::distanceType< T >::square_distance_type |
Suggested distance type for distances that use accumulation of squares of type elements (for example l2SqrDistantor).