DGtal 1.4.0
|
Aim: defines the concept of metric spaces. More...
#include <DGtal/geometry/volumes/distance/CMetricSpace.h>
Public Types | |
typedef T::Point | Point |
typedef T::Space | Space |
typedef T::Value | Value |
typedef T::RawValue | RawValue |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((CSpace< Space >)) | |
BOOST_CONCEPT_ASSERT ((CQuantity< Value >)) | |
BOOST_CONCEPT_ASSERT ((CQuantity< RawValue >)) | |
BOOST_CONCEPT_USAGE (CMetricSpace) | |
void | checkConstConstraints () const |
Private Attributes | |
T | myX |
Point | myPoint |
Point | myPoint2 |
Point | myPoint3 |
Value | myValue |
RawValue | myRawValue |
DGtal::Closest | myClosest |
Aim: defines the concept of metric spaces.
Description of concept 'CMetricSpace'
Models of metric spaces must satsify metric space conditions as described in Metric Spaces, Digital Metric Spaces and Related Concepts. For short, models must have a Point inner type and a distance Value type.
In addition, CMetricSpace models should implement a distance function (operator ()) on points satisfying the metric conditions:
Two additional methods must be implemented:
Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity |
---|---|---|---|---|---|---|---|
distance computation | x(aPoint,anotherPoint) | aPoint and anotherPoint of type Point | a value of type Value | compute the distance between two points | - | ||
raw distance computation | x.rawDistance(aPoint,anotherPoint) | aPoint and anotherPoint of type Point | a value of type RawValue | compute the raw representation of the distance between two points | - | ||
closest point test | closest(aOrigin, aP, aQ) | aOrigin, aP,aQ of type aPoint | a value of type Closest | decide between aP and aQ which one is closer to the origin. This functions returns either DGtal::ClosestFIRST if aP is closer, DGtal::ClosestSECOND if aQ is closer and DGtal::ClosestBOTH if both are equidistant. | - |
LpMetric, ExactPredicateLpSeparableMetric, InexactPredicateLpSeparableMetric.
T | the type that should be a model of CMetricSpace. |
Definition at line 124 of file CMetricSpace.h.
typedef T::Point DGtal::concepts::CMetricSpace< T >::Point |
Definition at line 128 of file CMetricSpace.h.
typedef T::RawValue DGtal::concepts::CMetricSpace< T >::RawValue |
Definition at line 131 of file CMetricSpace.h.
typedef T::Space DGtal::concepts::CMetricSpace< T >::Space |
Definition at line 129 of file CMetricSpace.h.
typedef T::Value DGtal::concepts::CMetricSpace< T >::Value |
Definition at line 130 of file CMetricSpace.h.
DGtal::concepts::CMetricSpace< T >::BOOST_CONCEPT_ASSERT | ( | (CQuantity< RawValue >) | ) |
DGtal::concepts::CMetricSpace< T >::BOOST_CONCEPT_ASSERT | ( | (CQuantity< Value >) | ) |
DGtal::concepts::CMetricSpace< T >::BOOST_CONCEPT_ASSERT | ( | (CSpace< Space >) | ) |
|
inline |
Definition at line 137 of file CMetricSpace.h.
References DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
inline |
Definition at line 142 of file CMetricSpace.h.
References DGtal::concepts::CMetricSpace< T >::myClosest, DGtal::concepts::CMetricSpace< T >::myPoint, DGtal::concepts::CMetricSpace< T >::myPoint2, DGtal::concepts::CMetricSpace< T >::myPoint3, DGtal::concepts::CMetricSpace< T >::myRawValue, DGtal::concepts::CMetricSpace< T >::myValue, DGtal::concepts::CMetricSpace< T >::myX, and DGtal::concepts::ConceptUtils::sameType().
Referenced by DGtal::concepts::CMetricSpace< T >::BOOST_CONCEPT_USAGE().
|
private |
Definition at line 156 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 153 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 153 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 153 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 155 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 154 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().
|
private |
Definition at line 152 of file CMetricSpace.h.
Referenced by DGtal::concepts::CMetricSpace< T >::checkConstConstraints().