31 #if defined(DigitalMetricAdapter_RECURSES)
32 #error Recursive header files inclusion detected in DigitalMetricAdapter.h
35 #define DigitalMetricAdapter_RECURSES
37 #if !defined DigitalMetricAdapter_h
39 #define DigitalMetricAdapter_h
44 #include "DGtal/base/Common.h"
45 #include "DGtal/geometry/volumes/distance/CMetricSpace.h"
46 #include "DGtal/kernel/CInteger.h"
47 #include "DGtal/base/ConstAlias.h"
48 #include "DGtal/kernel/NumberTraits.h"
70 template <
typename TMetric,
typename TInteger =
typename TMetric::Space::Integer>
111 if (
this != &anotherMetric)
171 const Point &q)
const
173 if (this->
operator()(a,p) < this->
operator()(a,q))
175 if (this->
operator()(a,p) > this->
operator()(a,q))
188 out <<
"[DigitalMetricAdapter] adapted from "<< *
myMetric;
225 template <
typename T>
236 #undef DigitalMetricAdapter_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: simple adapter class which adapts any models of concepts::CMetricSpace to a model of concepts::C...
TMetric Metric
Input metric type.
Value RawValue
RawValue type.
TInteger Value
Values are integer numbers.
DGtal::Closest closest(const Point &a, const Point &p, const Point &q) const
BOOST_CONCEPT_ASSERT((concepts::CMetricSpace< Metric >))
BOOST_CONCEPT_ASSERT((concepts::CInteger< Value >))
Value rawDistance(const Point &p, const Point &q) const
Metric::Space Space
Space type.
void selfDisplay(std::ostream &out) const
Metric::Point Point
Point type.
Value operator()(const Point &p, const Point &q) const
DigitalMetricAdapter(const DigitalMetricAdapter &anotherMetric)
DigitalMetricAdapter(ConstAlias< Metric > aMetric)
DigitalMetricAdapter & operator=(const DigitalMetricAdapter &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: The traits class for all models of Cinteger.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Aim: defines the concept of metric spaces.