DGtal  1.5.beta
CWithGradientMap.h
1 
17 #pragma once
18 
31 #if defined(CWithGradientMap_RECURSES)
32 #error Recursive header files inclusion detected in CWithGradientMap.h
33 #else // defined(CWithGradientMap_RECURSES)
35 #define CWithGradientMap_RECURSES
36 
37 #if !defined CWithGradientMap_h
39 #define CWithGradientMap_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CUnaryFunctor.h"
47 
48 namespace DGtal
49 {
50  namespace concepts
51  {
53 // class CWithGradientMap
90 template <typename T>
92 {
93  // ----------------------- Concept checks ------------------------------
94 public:
95  typedef typename T::Argument Argument;
96  typedef typename T::RealVector RealVector;
97  typedef typename T::GradientMap GradientMap;
101  {
103  }
105  {
106  ConceptUtils::sameType( myGMap, myX.gradientMap() );
107  }
108  // ------------------------- Private Datas --------------------------------
109 private:
110  T myX; // do not require T to be default constructible.
112 
113  // ------------------------- Internals ------------------------------------
114 private:
115 
116 }; // end of concept CWithGradientMap
117  }
118 } // namespace DGtal
119 
120 // //
122 
123 #endif // !defined CWithGradientMap_h
124 
125 #undef CWithGradientMap_RECURSES
126 #endif // else defined(CWithGradientMap_RECURSES)
Space::RealVector RealVector
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:90
Aim: Such object provides a gradient map that associates to each argument some real vector.
BOOST_CONCEPT_ASSERT((CUnaryFunctor< GradientMap, Argument, RealVector >))
BOOST_CONCEPT_ASSERT((boost::CopyConstructible< GradientMap >))
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34