DGtal  0.9.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)
34 
35 #define CMetricSpace_RECURSES
36 
37 #if !defined CMetricSpace_h
38 
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.
154  Value myValue;
155  RawValue myRawValue;
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)
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
void checkConstConstraints() const
Definition: CMetricSpace.h:142
void sameType(const T &t1, const T &t2)
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines...
Definition: CSpace.h:105
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
Aim: defines the concept of quantity in DGtal.
Definition: CQuantity.h:92
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: defines the concept of metric spaces.
Definition: CMetricSpace.h:124
BOOST_CONCEPT_ASSERT((CSpace< Space >))
Closest
Definition: Common.h:123