An L_p metric for vector spaces. More...
Static Public Member Functions | |
static double | Distance (const Vector &a, const Vector &b) |
Computes the distance metric between two points. | |
static double | Distance (const Vector &a, const Vector &b) |
Computes the distance metric between two points. | |
template<int t_result_pow> | |
static double | PowDistance (const Vector &a, const Vector &b) |
Computes the distance metric between two points, raised to a particular power. | |
template<int t_result_pow> | |
static double | PowDistance (const Vector &a, const Vector &b) |
Computes the distance metric between two points, raised to a particular power. |
An L_p metric for vector spaces.
A generic Metric class should simply compute the distance between two points. An LMetric operates for integer powers on Vector spaces.
Definition at line 724 of file bounds.h.
static double LMetric< t_pow >::Distance | ( | const Vector & | a, | |
const Vector & | b | |||
) | [inline, static] |
Computes the distance metric between two points.
Definition at line 729 of file bounds.h.
References GenVector< T >::length(), and GenVector< T >::ptr().
static double LMetric< t_pow >::Distance | ( | const Vector & | a, | |
const Vector & | b | |||
) | [inline, static] |
Computes the distance metric between two points.
Definition at line 729 of file bounds.h.
References GenVector< T >::length(), and GenVector< T >::ptr().
static double LMetric< t_pow >::PowDistance | ( | const Vector & | a, | |
const Vector & | b | |||
) | [inline, static] |
Computes the distance metric between two points, raised to a particular power.
This might be faster so that you could get, for instance, squared L2 distance.
Definition at line 742 of file bounds.h.
References GenVector< T >::length(), and GenVector< T >::ptr().
static double LMetric< t_pow >::PowDistance | ( | const Vector & | a, | |
const Vector & | b | |||
) | [inline, static] |
Computes the distance metric between two points, raised to a particular power.
This might be faster so that you could get, for instance, squared L2 distance.
Definition at line 742 of file bounds.h.
References GenVector< T >::length(), and GenVector< T >::ptr().