DGtal 1.3.0
Loading...
Searching...
No Matches
CPowerMetric.h
1
17#pragma once
18
31#if defined(CPowerMetric_RECURSES)
32#error Recursive header files inclusion detected in CPowerMetric.h
33#else // defined(CPowerMetric_RECURSES)
35#define CPowerMetric_RECURSES
36
37#if !defined CPowerMetric_h
39#define CPowerMetric_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/kernel/CSpace.h"
46#include "DGtal/base/CQuantity.h"
48
49namespace DGtal
50{
51namespace concepts
52{
53
55// class CPowerMetric
97template <typename T>
99{
100 // ----------------------- Concept checks ------------------------------
101public:
102 typedef typename T::Space Space;
103 typedef typename T::Weight Weight;
104 typedef typename T::Value Value;
105 typedef typename T::Point Point;
106
110
111
113 {
115 }
116
118 {
119 ConceptUtils::sameType( myW3, myX.powerDistance( myPoint, myPoint2, myW1 ) );
121 }
122 // ------------------------- Private Datas --------------------------------
123private:
124 T myX; // do not require T to be default constructible.
129 // ------------------------- Internals ------------------------------------
130private:
131
132}; // end of concept CPowerMetric
133}
134} // namespace DGtal
135
136// //
138
139#endif // !defined CPowerMetric_h
140
141#undef CPowerMetric_RECURSES
142#endif // else defined(CPowerMetric_RECURSES)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Closest
Definition: Common.h:147
Aim: defines the concept of special weighted metrics, so called power metrics.
Definition: CPowerMetric.h:99
BOOST_CONCEPT_ASSERT((CSpace< Space >))
BOOST_CONCEPT_ASSERT((CQuantity< Weight >))
BOOST_CONCEPT_ASSERT((CQuantity< Value >))
Aim: defines the concept of quantity in DGtal.
Definition: CQuantity.h:93
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34