Savarese Software Research Corporation
spatial::euclidean_distance< Point, Distance, i > Struct Template Reference

euclidean_distance is a template class that houses functions for determining distances and distance-related values in a Euclidean space. More...

#include <distance.h>

List of all members.

Public Types

typedef Distance distance_type

Static Public Member Functions

static distance_type d2 (const Point &from, const Point &to)
 Returns the square of the distance between two points.

Detailed Description

template<typename Point, typename Distance = double, const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
struct spatial::euclidean_distance< Point, Distance, i >

euclidean_distance is a template class that houses functions for determining distances and distance-related values in a Euclidean space.

These functions are static and rely on the enclosing class to enable implementation of partial specializations.

Definition at line 40 of file distance.h.


Member Typedef Documentation

template<typename Point , typename Distance = double, const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
typedef Distance spatial::euclidean_distance< Point, Distance, i >::distance_type

Definition at line 41 of file distance.h.


Member Function Documentation

template<typename Point , typename Distance = double, const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
static distance_type spatial::euclidean_distance< Point, Distance, i >::d2 ( const Point &  from,
const Point &  to 
) [inline, static]

Returns the square of the distance between two points.

Parameters:
fromThe first end point.
toThe second end point.
Returns:
The square of the distance between from and to.

Definition at line 50 of file distance.h.


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

Savarese Software Research Corporation
Copyright © 2003-2005 Daniel F. Savarese.
Copyright © 2006-2009 Savarese Software Research Corporation.