DGtal
1.3.beta
src
DGtal
topology
CAdjacency.h
1
17
#pragma once
18
31
#if defined(CAdjacency_RECURSES)
32
#error Recursive header files inclusion detected in CAdjacency.h
33
#else // defined(CAdjacency_RECURSES)
34
35
#define CAdjacency_RECURSES
36
37
#if !defined CAdjacency_h
38
39
#define CAdjacency_h
40
42
// Inclusions
43
#include <iostream>
44
#include <vector>
45
#include "DGtal/base/Common.h"
46
#include "DGtal/base/ConceptUtils.h"
47
#include "DGtal/graph/CUndirectedSimpleLocalGraph.h"
49
50
// @since 0.8 In DGtal::concepts
51
namespace
DGtal
{
52
namespace
concepts {
53
55
// class CAdjacency
98
template
<
typename
Adj>
99
struct
CAdjacency
:
CUndirectedSimpleLocalGraph
<Adj>
100
{
101
// ----------------------- Concept checks ------------------------------
102
public
:
103
104
typedef
typename
Adj::Space
Space
;
105
typedef
typename
Adj::Point
Point
;
106
typedef
typename
Adj::Adjacency
Adjacency
;
107
108
BOOST_CONCEPT_USAGE
(
CAdjacency
)
109
{
110
// check isAdjacentTo
111
ConceptUtils::sameType
(
myBool
,
myAdj
.isAdjacentTo(
myP1
,
myP2
) );
112
// check isProperlyAdjacentTo
113
ConceptUtils::sameType
(
myBool
,
114
myAdj
.isProperlyAdjacentTo(
myP1
,
myP2
) );
115
}
116
117
// ------------------------- Private Datas --------------------------------
118
private
:
119
Adj
myAdj
;
120
Point
myP1
;
121
Point
myP2
;
122
bool
myBool
;
123
std::back_insert_iterator< std::vector<Point> >
myInserter
;
124
125
// ------------------------- Internals ------------------------------------
126
private
:
127
128
};
// end of concept CAdjacency
129
130
}
// namespace concepts
131
}
// namespace DGtal
132
133
// //
135
136
#endif // !defined CAdjacency_h
137
138
#undef CAdjacency_RECURSES
139
#endif // else defined(CAdjacency_RECURSES)
DGtal::concepts::CAdjacency::myP2
Point myP2
Definition:
CAdjacency.h:121
DGtal::concepts::CAdjacency::myInserter
std::back_insert_iterator< std::vector< Point > > myInserter
Definition:
CAdjacency.h:123
DGtal::concepts::CAdjacency::Point
Adj::Point Point
Definition:
CAdjacency.h:105
DGtal::concepts::CAdjacency::myAdj
Adj myAdj
Definition:
CAdjacency.h:119
DGtal::concepts::CUndirectedSimpleLocalGraph
Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not neces...
Definition:
CUndirectedSimpleLocalGraph.h:100
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CAdjacency
Aim: The concept CAdjacency defines an elementary adjacency relation between points of a digital spac...
Definition:
CAdjacency.h:99
DGtal::concepts::CAdjacency::Adjacency
Adj::Adjacency Adjacency
Definition:
CAdjacency.h:106
DGtal::concepts::CAdjacency::myP1
Point myP1
Definition:
CAdjacency.h:120
DGtal::concepts::CAdjacency::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CAdjacency)
Definition:
CAdjacency.h:108
Space
SpaceND< 2 > Space
Definition:
testSimpleRandomAccessRangeFromPoint.cpp:42
DGtal::concepts::CAdjacency::Space
Adj::Space Space
Definition:
CAdjacency.h:104
DGtal::concepts::CAdjacency::myBool
bool myBool
Definition:
CAdjacency.h:122
Point
MyPointD Point
Definition:
testClone2.cpp:383
Generated on Mon Jun 20 2022 18:23:21 for DGtal by
1.8.17