DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CSCellEmbedder.h
1
16
17
#pragma once
18
30
31
#if defined(CSCellEmbedder_RECURSES)
32
#error Recursive header files inclusion detected in CSCellEmbedder.h
33
#else
// defined(CSCellEmbedder_RECURSES)
35
#define CSCellEmbedder_RECURSES
36
37
#if !defined CSCellEmbedder_h
39
#define CSCellEmbedder_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 CSCellEmbedder
96
template
<
typename
T>
97
struct
CSCellEmbedder
:
CUnaryFunctor
<T, typename T::SCell, typename T::RealPoint>
98
{
99
// ----------------------- Concept checks ------------------------------
100
public
:
101
typedef
typename
T::KSpace
KSpace
;
102
typedef
typename
T::SCell
SCell
;
103
typedef
typename
T::RealPoint
RealPoint
;
104
typedef
typename
T::Argument
Argument
;
105
typedef
typename
T::Value
Value
;
106
107
BOOST_CONCEPT_ASSERT
((
concepts::CCellularGridSpaceND< KSpace >
));
108
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< SCell, typename KSpace::SCell >::value
));
109
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< SCell, Argument >::value
));
110
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, Value >::value
));
111
BOOST_CONCEPT_USAGE
(
CSCellEmbedder
)
112
{
113
checkConstConstraints
();
114
}
115
116
void
checkConstConstraints
()
const
117
{
// operator()
118
ConceptUtils::sameType
(
myRP
,
myX
(
myP
) );
119
ConceptUtils::sameType
(
myK
,
myX
.space() );
120
}
121
// ------------------------- Private Data --------------------------------
122
private
:
123
T
myX
;
// do not require T to be default constructible.
124
SCell
myP
;
125
RealPoint
myRP
;
126
const
KSpace
myK
;
127
128
// ------------------------- Internals ------------------------------------
129
private
:
130
131
};
// end of concept CSCellEmbedder
132
133
}
// namespace concepts
134
}
// namespace DGtal
135
136
// //
138
139
#endif
// !defined CSCellEmbedder_h
140
141
#undef CSCellEmbedder_RECURSES
142
#endif
// else defined(CSCellEmbedder_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::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition
CCellularGridSpaceND.h:164
DGtal::concepts::CSCellEmbedder
Aim: A cell embedder is a mapping from signed cells to Euclidean points. It adds inner types to funct...
Definition
CSCellEmbedder.h:98
DGtal::concepts::CSCellEmbedder::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSCellEmbedder)
Definition
CSCellEmbedder.h:111
DGtal::concepts::CSCellEmbedder::RealPoint
T::RealPoint RealPoint
Definition
CSCellEmbedder.h:103
DGtal::concepts::CSCellEmbedder::Argument
T::Argument Argument
Definition
CSCellEmbedder.h:104
DGtal::concepts::CSCellEmbedder::Value
T::Value Value
Definition
CSCellEmbedder.h:105
DGtal::concepts::CSCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< SCell, typename KSpace::SCell >::value))
DGtal::concepts::CSCellEmbedder::SCell
T::SCell SCell
Definition
CSCellEmbedder.h:102
DGtal::concepts::CSCellEmbedder::checkConstConstraints
void checkConstConstraints() const
Definition
CSCellEmbedder.h:116
DGtal::concepts::CSCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, Value >::value))
DGtal::concepts::CSCellEmbedder::myP
SCell myP
Definition
CSCellEmbedder.h:124
DGtal::concepts::CSCellEmbedder::myRP
RealPoint myRP
Definition
CSCellEmbedder.h:125
DGtal::concepts::CSCellEmbedder::myK
const KSpace myK
Definition
CSCellEmbedder.h:126
DGtal::concepts::CSCellEmbedder::myX
T myX
Definition
CSCellEmbedder.h:123
DGtal::concepts::CSCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< SCell, Argument >::value))
DGtal::concepts::CSCellEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< KSpace >))
DGtal::concepts::CSCellEmbedder::KSpace
T::KSpace KSpace
Definition
CSCellEmbedder.h:101
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
CSCellEmbedder.h
Generated on
for DGtal by
1.18.0