DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CSeparableMetric.h
1 
17 #pragma once
18 
32 #if defined(CSeparableMetric_RECURSES)
33 #error Recursive header files inclusion detected in CSeparableMetric.h
34 #else // defined(CSeparableMetric_RECURSES)
35 
36 #define CSeparableMetric_RECURSES
37 
38 #if !defined CSeparableMetric_h
39 
40 #define CSeparableMetric_h
41 
43 // Inclusions
44 #include <iostream>
45 #include "boost/concept_check.hpp"
46 #include "DGtal/base/Common.h"
48 
49 namespace DGtal
50 {
51 
53  // class CSeparableMetric
88  template <typename T>
90  {
91 
92  typedef typename T::InternalValue InternalValue;
93  typedef typename T::Value Value;
94  typedef typename T::Abscissa Abscissa;
95 
96  // ----------------------- Concept checks ------------------------------
97  public:
99  {
100  //SeparableMetric model should have a F(Abscissa, Abscissa, InternalValue) returing an InternalValue
101  ConceptUtils::sameType( h, myT.F(a,a,h) );
102  //SeparableMetric model should have a Sep(Abscissa,InternalValue, Abscissa,InternalValue) returing an Value
103  ConceptUtils::sameType( a, myT.Sep(a,h,a,h) );
104  }
105 
106  // ------------------------- Private Datas --------------------------------
107  private:
108 
109  // ------------------------- Internals ------------------------------------
110  private:
111  T myT;
114 
115 
116  }; // end of concept CSeparableMetric
117 
118 } // namespace DGtal
119 
120 
121 // //
123 
124 #endif // !defined CSeparableMetric_h
125 
126 #undef CSeparableMetric_RECURSES
127 #endif // else defined(CSeparableMetric_RECURSES)