31 #if defined(DigitalMetricAdapter_RECURSES) 32 #error Recursive header files inclusion detected in DigitalMetricAdapter.h 33 #else // defined(DigitalMetricAdapter_RECURSES) 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>
227 operator<< ( std::ostream & out, const DigitalMetricAdapter<T> & object );
234 #endif // !defined DigitalMetricAdapter_h 236 #undef DigitalMetricAdapter_RECURSES 237 #endif // else defined(DigitalMetricAdapter_RECURSES) DigitalMetricAdapter(const DigitalMetricAdapter &anotherMetric)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
DigitalMetricAdapter & operator=(const DigitalMetricAdapter &other)
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
void selfDisplay(std::ostream &out) const
DGtal::Closest closest(const Point &a, const Point &p, const Point &q) const
BOOST_CONCEPT_ASSERT((concepts::CMetricSpace< Metric >))
DigitalMetricAdapter(ConstAlias< Metric > aMetric)
Aim: The traits class for all models of Cinteger.
Aim: simple adapter class which adapts any models of concepts::CMetricSpace to a model of concepts::C...
Metric::Point Point
Point type.
DGtal is the top-level namespace which contains all DGtal functions and types.
Metric::Space Space
Space type.
Value RawValue
RawValue type.
Aim: defines the concept of metric spaces.
TMetric Metric
Input metric type.
Value rawDistance(const Point &p, const Point &q) const
TInteger Value
Values are integer numbers.
Value operator()(const Point &p, const Point &q) const