LMetric< t_pow > Class Template Reference

An L_p metric for vector spaces. More...

List of all members.

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.

Detailed Description

template<int t_pow>
class LMetric< t_pow >

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.


Member Function Documentation

template<int t_pow>
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().

template<int t_pow>
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().

template<int t_pow>
template<int t_result_pow>
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().

template<int t_pow>
template<int t_result_pow>
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().


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 12:04:40 2011 for FASTlib by  doxygen 1.6.3