31#if defined(SeparableMetricAdapter_RECURSES)
32#error Recursive header files inclusion detected in SeparableMetricAdapter.h
35#define SeparableMetricAdapter_RECURSES
37#if !defined SeparableMetricAdapter_h
39#define SeparableMetricAdapter_h
45#include "DGtal/base/Common.h"
46#include "DGtal/geometry/volumes/distance/CMetricSpace.h"
47#include "DGtal/base/ConstAlias.h"
78 template <
typename TMetric>
90 typedef typename Metric::Point
Point;
94 typedef typename Metric::Value
Value;
98 typedef typename Metric::Vector
Vector;
100 typedef typename Metric::Space
Space;
160 return myMetric->rawDistance(aP,aQ);
175 const Point &second)
const
177 return myMetric->closest(origin,first,second);
204 const Point &startingPoint,
205 const Point &endPoint,
206 const typename Point::UnsignedComponent
dim)
const;
241 const typename Point::UnsignedComponent
dim,
262 template <
typename TM>
271#include "DGtal/geometry/volumes/distance/SeparableMetricAdapter.ih"
278#undef SeparableMetricAdapter_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Adapts any model of CMetric to construct a separable metric (model of CSeparableMetric).
Metric::RawValue RawValue
Type for raw values.
RawValue rawDistance(const Point &aP, const Point &aQ) const
Point::Coordinate Abscissa
Type for point abscissa.
BOOST_CONCEPT_ASSERT((concepts::CMetricSpace< TMetric >))
SeparableMetricAdapter & operator=(const SeparableMetricAdapter &other)
void selfDisplay(std::ostream &out) const
Metric::Space Space
Type for Space.
Metric::Value Value
Type for values.
Metric::Point Point
Type for points.
Metric::Vector Vector
Type for vectors.
bool hiddenBy(const Point &u, const Point &v, const Point &w, const Point &startingPoint, const Point &endPoint, const typename Point::UnsignedComponent dim) const
Closest closest(const Point &origin, const Point &first, const Point &second) const
~SeparableMetricAdapter()
TMetric Metric
Copy the space type.
Value operator()(const Point &aP, const Point &aQ) const
Abscissa binarySearchHidden(const Point &u, const Point &v, const typename Point::UnsignedComponent dim, const Point &lower, const Point &upper) const
SeparableMetricAdapter(ConstAlias< Metric > aMetric)
SeparableMetricAdapter(const SeparableMetricAdapter &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: defines the concept of metric spaces.
Vector lower(const Vector &z, unsigned int k)
Vector upper(const Vector &z, unsigned int k)