DGtal  1.4.2
CMetricSpace.h
1 
17 #pragma once
18 
31 #if defined(CMetricSpace_RECURSES)
32 #error Recursive header files inclusion detected in CMetricSpace.h
33 #else // defined(CMetricSpace_RECURSES)
35 #define CMetricSpace_RECURSES
36 
37 #if !defined CMetricSpace_h
39 #define CMetricSpace_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 
49 namespace DGtal
50 {
51  namespace concepts
52  {
53 
55 // class CMetricSpace
123 template <typename T>
125 {
126  // ----------------------- Concept checks ------------------------------
127 public:
128  typedef typename T::Point Point;
129  typedef typename T::Space Space;
130  typedef typename T::Value Value;
131  typedef typename T::RawValue RawValue;
132 
136 
138  {
140  }
141 
143  {
144  // const method dummyConst should take parameter myA of type A and return
145  // something of type B
146  ConceptUtils::sameType( myValue, myX.operator()( myPoint , myPoint2 ) );
149  }
150  // ------------------------- Private Datas --------------------------------
151 private:
152  T myX; // do not require T to be default constructible.
157  // ------------------------- Internals ------------------------------------
158 private:
159 
160 }; // end of concept CMetricSpace
161  } //namespace concept
162 } // namespace DGtal
163 
164 // //
166 
167 #endif // !defined CMetricSpace_h
168 
169 #undef CMetricSpace_RECURSES
170 #endif // else defined(CMetricSpace_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:146
Aim: defines the concept of metric spaces.
Definition: CMetricSpace.h:125
BOOST_CONCEPT_ASSERT((CQuantity< RawValue >))
BOOST_CONCEPT_ASSERT((CQuantity< Value >))
BOOST_CONCEPT_ASSERT((CSpace< Space >))
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
MyPointD Point
Definition: testClone2.cpp:383