30 #if defined(LpMetric_RECURSES)
31 #error Recursive header files inclusion detected in LpMetric.h
34 #define LpMetric_RECURSES
36 #if !defined LpMetric_h
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/CSpace.h"
46 #include "DGtal/kernel/CEuclideanRing.h"
73 template <
typename TSpace>
172 const Point &second)
const
176 if (dfirst < dsecond)
179 if (dfirst > dsecond)
191 out <<
"[LpMetric] Lp Metric exponent=" <<
myExponent ;
217 template <
typename T>
221 object.selfDisplay( out );
232 #undef LpMetric_RECURSES
Aim: implements l_p metrics.
Closest closest(const Point &origin, const Point &first, const Point &second) const
double RawValue
Type for raw distance values.
LpMetric(const double anExponent)
LpMetric & operator=(const LpMetric &other)
TSpace Space
Copy the space type.
void selfDisplay(std::ostream &out) const
Space::RealPoint Point
Type for points (RealPoint for this class)
RawValue rawDistance(const Point &aP, const Point &aQ) const
double Value
Type for distance values.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Value operator()(const Point &aP, const Point &aQ) const
Value myExponent
Exponent value.
LpMetric(const LpMetric &other)
Aim: Implements basic operations that will be used in Point and Vector classes.
DGtal::Dimension Dimension
Copy of the dimension type.
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: Defines the concept describing a digital space, ie a cartesian product of integer lines.