DGtal 0.3.0

CSeparableMetric.h

Go to the documentation of this file.
00001 
00017 #pragma once
00018 
00031 #if defined(CSeparableMetric_RECURSES)
00032 #error Recursive header files inclusion detected in CSeparableMetric.h
00033 #else // defined(CSeparableMetric_RECURSES)
00034 
00035 #define CSeparableMetric_RECURSES
00036 
00037 #if !defined CSeparableMetric_h
00038 
00039 #define CSeparableMetric_h
00040 
00042 // Inclusions
00043 #include <iostream>
00044 #include "boost/concept_check.hpp"
00045 #include "DGtal/base/Common.h"
00047 
00048 namespace DGtal
00049 {
00050 
00052   // class CSeparableMetric
00087   template <typename T>
00088   struct CSeparableMetric
00089   {
00090 
00091     typedef typename T::InternalValue InternalValue;
00092     typedef typename T::Value Value;
00093     typedef typename T::Abscissa Abscissa;
00094                 
00095     // ----------------------- Concept checks ------------------------------
00096   public:
00097     BOOST_CONCEPT_USAGE( CSeparableMetric )
00098     {
00099       //SeparableMetric  model should have a F(Abscissa, Abscissa, InternalValue) returing an InternalValue
00100       ConceptUtils::sameType( h, myT.F(a,a,h) );
00101       //SeparableMetric  model should have a Sep(Abscissa,InternalValue, Abscissa,InternalValue) returing an Value      
00102       ConceptUtils::sameType( a, myT.Sep(a,h,a,h) );
00103     }
00104                 
00105     // ------------------------- Private Datas --------------------------------
00106   private:
00107     
00108     // ------------------------- Internals ------------------------------------
00109   private:
00110     T myT;
00111     Abscissa a;
00112     InternalValue h;
00113                 
00114                         
00115   }; // end of concept CSeparableMetric
00116   
00117 } // namespace DGtal
00118 
00119 
00120 //                                                                           //
00122 
00123 #endif // !defined CSeparableMetric_h
00124 
00125 #undef CSeparableMetric_RECURSES
00126 #endif // else defined(CSeparableMetric_RECURSES)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines