DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CCellEmbedder.h
1
16
17
#pragma once
18
30
31
#if defined(CCellEmbedder_RECURSES)
32
#error Recursive header files inclusion detected in CCellEmbedder.h
33
#else
// defined(CCellEmbedder_RECURSES)
35
#define CCellEmbedder_RECURSES
36
37
#if !defined CCellEmbedder_h
39
#define CCellEmbedder_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/base/CUnaryFunctor.h"
46
#include "DGtal/topology/CCellularGridSpaceND.h"
48
49
// @since 0.8 In DGtal::concepts
50
namespace
DGtal
{
51
namespace
concepts
{
52
54
// class CCellEmbedder
95
template
<
typename
T>
96
struct
CCellEmbedder
:
CUnaryFunctor
<T, typename T::Cell, typename T::RealPoint>
97
{
98
// ----------------------- Concept checks ------------------------------
99
public
:
100
typedef
typename
T::KSpace
KSpace
;
101
typedef
typename
T::Cell
Cell
;
102
typedef
typename
T::RealPoint
RealPoint
;
103
typedef
typename
T::Argument
Argument
;
104
typedef
typename
T::Value
Value
;
105
106
BOOST_CONCEPT_ASSERT
((
CCellularGridSpaceND< KSpace >
));
107
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Cell, typename KSpace::Cell >::value
));
108
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Cell, Argument >::value
));
109
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, Value >::value
));
110
BOOST_CONCEPT_USAGE
(
CCellEmbedder
)
111
{
112
checkConstConstraints
();
113
}
114
115
void
checkConstConstraints
()
const
116
{
// operator()
117
ConceptUtils::sameType
(
myRP
,
myX
(
myP
) );
118
}
119
// ------------------------- Private Data --------------------------------
120
private
:
121
T
myX
;
// do not require T to be default constructible.
122
Cell
myP
;
123
RealPoint
myRP
;
124
125
// ------------------------- Internals ------------------------------------
126
private
:
127
128
};
// end of concept CCellEmbedder
129
130
}
// namespace concepts
131
}
// namespace DGtal
132
133
// //
135
136
#endif
// !defined CCellEmbedder_h
137
138
#undef CCellEmbedder_RECURSES
139
#endif
// else defined(CCellEmbedder_RECURSES)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CCellEmbedder
Aim: A cell embedder is a mapping from unsigned cells to Euclidean points. It adds inner types to fun...
Definition
CCellEmbedder.h:97
DGtal::concepts::CCellEmbedder::KSpace
T::KSpace KSpace
Definition
CCellEmbedder.h:100
DGtal::concepts::CCellEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CCellularGridSpaceND< KSpace >))
DGtal::concepts::CCellEmbedder::checkConstConstraints
void checkConstConstraints() const
Definition
CCellEmbedder.h:115
DGtal::concepts::CCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Cell, typename KSpace::Cell >::value))
DGtal::concepts::CCellEmbedder::myRP
RealPoint myRP
Definition
CCellEmbedder.h:123
DGtal::concepts::CCellEmbedder::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CCellEmbedder)
Definition
CCellEmbedder.h:110
DGtal::concepts::CCellEmbedder::myP
Cell myP
Definition
CCellEmbedder.h:122
DGtal::concepts::CCellEmbedder::Cell
T::Cell Cell
Definition
CCellEmbedder.h:101
DGtal::concepts::CCellEmbedder::RealPoint
T::RealPoint RealPoint
Definition
CCellEmbedder.h:102
DGtal::concepts::CCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, Value >::value))
DGtal::concepts::CCellEmbedder::Value
T::Value Value
Definition
CCellEmbedder.h:104
DGtal::concepts::CCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Cell, Argument >::value))
DGtal::concepts::CCellEmbedder::Argument
T::Argument Argument
Definition
CCellEmbedder.h:103
DGtal::concepts::CCellEmbedder::myX
T myX
Definition
CCellEmbedder.h:121
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition
CCellularGridSpaceND.h:164
DGtal::concepts::CUnaryFunctor
Aim: Defines a unary functor, which associates arguments to results.
Definition
CUnaryFunctor.h:90
DGtal::concepts::ConceptUtils::SameType::value
static const bool value
Definition
ConceptUtils.h:107
src
DGtal
topology
CCellEmbedder.h
Generated on
for DGtal by
1.18.0