DGtal 1.4.0
Loading...
Searching...
No Matches
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)
35#define CAdjacency_RECURSES
36
37#if !defined CAdjacency_h
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
51namespace DGtal {
52 namespace concepts {
53
55 // class CAdjacency
98 template <typename 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
109 {
110 // check isAdjacentTo
111 ConceptUtils::sameType( myBool, myAdj.isAdjacentTo( myP1, myP2 ) );
112 // check isProperlyAdjacentTo
114 myAdj.isProperlyAdjacentTo( myP1, myP2 ) );
115 }
116
117 // ------------------------- Private Datas --------------------------------
118 private:
119 Adj myAdj;
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)
void sameType(const T &, const T &)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: The concept CAdjacency defines an elementary adjacency relation between points of a digital spac...
Definition CAdjacency.h:100
std::back_insert_iterator< std::vector< Point > > myInserter
Definition CAdjacency.h:123
Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not neces...