DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
kernel
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)
34
35
#define CWithGradientMap_RECURSES
36
37
#if !defined CWithGradientMap_h
38
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
52
// class CWithGradientMap
89
template
<
typename
T>
90
struct
CWithGradientMap
91
{
92
// ----------------------- Concept checks ------------------------------
93
public
:
94
typedef
typename
T::Argument
Argument
;
95
typedef
typename
T::RealVector
RealVector
;
96
typedef
typename
T::GradientMap
GradientMap
;
97
BOOST_CONCEPT_ASSERT
(( boost::CopyConstructible< GradientMap > ));
98
BOOST_CONCEPT_ASSERT
((
CUnaryFunctor< GradientMap, Argument, RealVector >
));
99
BOOST_CONCEPT_USAGE
(
CWithGradientMap
)
100
{
101
checkConstConstraints
();
102
}
103
void
checkConstConstraints
()
const
104
{
105
ConceptUtils::sameType
(
myGMap
,
myX
.gradientMap() );
106
}
107
// ------------------------- Private Datas --------------------------------
108
private
:
109
T
myX
;
// do not require T to be default constructible.
110
GradientMap
myGMap
;
111
112
// ------------------------- Internals ------------------------------------
113
private
:
114
115
};
// end of concept CWithGradientMap
116
117
}
// namespace DGtal
118
119
// //
121
122
#endif // !defined CWithGradientMap_h
123
124
#undef CWithGradientMap_RECURSES
125
#endif // else defined(CWithGradientMap_RECURSES)
Generated on Wed Dec 19 2012 19:10:21 for DGtal by
1.8.1.1