DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CUndirectedSimpleGraph.h
1
16
17
#pragma once
18
30
31
#if defined(CUndirectedSimpleGraph_RECURSES)
32
#error Recursive header files inclusion detected in CUndirectedSimpleGraph.h
33
#else
// defined(CUndirectedSimpleGraph_RECURSES)
35
#define CUndirectedSimpleGraph_RECURSES
36
37
#if !defined CUndirectedSimpleGraph_h
39
#define CUndirectedSimpleGraph_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/base/CConstSinglePassRange.h"
46
#include "DGtal/graph/CUndirectedSimpleLocalGraph.h"
48
49
// @since 0.8 In DGtal::concepts
50
namespace
DGtal
{
51
namespace
concepts
{
52
54
// class CUndirectedSimpleGraph
101
template
<
typename
T>
102
struct
CUndirectedSimpleGraph
:
103
CUndirectedSimpleLocalGraph
<T>,
104
CConstSinglePassRange
<T>
105
{
106
// ----------------------- Concept checks ------------------------------
107
public
:
108
// 1. define first provided types (i.e. inner types), like
109
typedef
typename
T::Edge
Edge
;
110
typedef
typename
T::Size
Size
;
111
112
// 2. then check the presence of data members, operators and methods with
113
BOOST_CONCEPT_USAGE
(
CUndirectedSimpleGraph
)
114
{
115
// check const methods.
116
checkConstConstraints
();
117
}
118
void
checkConstConstraints
()
const
119
{
120
ConceptUtils::sameType
(
mySize
,
myX
.size() );
121
}
122
123
// ------------------------- Private Data --------------------------------
124
private
:
125
T
myX
;
// do not require T to be default constructible.
126
Size
mySize
;
127
128
// ------------------------- Internals ------------------------------------
129
private
:
130
131
};
// end of concept CUndirectedSimpleGraph
132
133
}
// namespace concepts
134
}
// namespace DGtal
135
136
// //
138
139
#endif
// !defined CUndirectedSimpleGraph_h
140
141
#undef CUndirectedSimpleGraph_RECURSES
142
#endif
// else defined(CUndirectedSimpleGraph_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::CConstSinglePassRange
Aim: Defines the concept describing a const single pass range.
Definition
CConstSinglePassRange.h:93
DGtal::concepts::CUndirectedSimpleGraph
Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not neces...
Definition
CUndirectedSimpleGraph.h:105
DGtal::concepts::CUndirectedSimpleGraph::Edge
T::Edge Edge
Definition
CUndirectedSimpleGraph.h:109
DGtal::concepts::CUndirectedSimpleGraph::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CUndirectedSimpleGraph)
Definition
CUndirectedSimpleGraph.h:113
DGtal::concepts::CUndirectedSimpleGraph::checkConstConstraints
void checkConstConstraints() const
Definition
CUndirectedSimpleGraph.h:118
DGtal::concepts::CUndirectedSimpleGraph::mySize
Size mySize
Definition
CUndirectedSimpleGraph.h:126
DGtal::concepts::CUndirectedSimpleGraph::myX
T myX
Definition
CUndirectedSimpleGraph.h:125
DGtal::concepts::CUndirectedSimpleGraph::Size
T::Size Size
Definition
CUndirectedSimpleGraph.h:110
DGtal::concepts::CUndirectedSimpleLocalGraph
Aim: Represents the concept of local graph: each vertex has neighboring vertices, but we do not neces...
Definition
CUndirectedSimpleLocalGraph.h:101
src
DGtal
graph
CUndirectedSimpleGraph.h
Generated on
for DGtal by
1.18.0