Open
Graph Drawing
Framework
v. 2023.09 (Elderberry)
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
Loading...
Searching...
No Matches
ogdf_iterator.h
Go to the documentation of this file.
1
31
#pragma once
32
33
#include <
ogdf/basic/Graph_d.h
>
34
35
namespace
ogdf
{
36
namespace
internal {
37
namespace
gcm {
38
namespace
graph {
39
42
template
<
typename
_Entry>
43
class
OGDFEntryIterator
{
44
public
:
45
using
Entry
=
_Entry
;
46
using
Iterator
=
OGDFEntryIterator<Entry>
;
47
48
protected
:
49
Entry
m_cur
;
50
51
public
:
52
OGDFEntryIterator
(
Entry
_cur
) :
m_cur
(
_cur
) {
53
//nothing to do
54
}
55
56
Iterator
&
operator--
() {
57
m_cur
=
m_cur
->pred();
58
return
*
this
;
59
}
60
61
Iterator
&
operator++
() {
62
m_cur
=
m_cur
->succ();
63
return
*
this
;
64
}
65
66
bool
operator==
(
const
Iterator
& b)
const
{
return
m_cur
== b.
m_cur
; }
67
68
bool
operator!=
(
const
Iterator
& b)
const
{
return
m_cur
!= b.
m_cur
; }
69
};
70
71
template
<
typename
Entry>
72
class
EntryIterator
:
public
OGDFEntryIterator
<Entry> {
73
private
:
74
using
parent
=
OGDFEntryIterator<Entry>
;
75
76
public
:
77
using
T
=
Entry
;
78
using
parent::parent;
79
80
Entry
operator*
() {
return
this->
m_cur
; }
81
};
82
84
class
IncidentEdgeIterator
:
public
OGDFEntryIterator
<adjEntry> {
85
private
:
86
using
parent
=
OGDFEntryIterator<adjEntry>
;
87
88
public
:
89
using
T
=
edge
;
90
using
parent::parent;
91
92
edge
operator*
() {
return
this->
m_cur
->
theEdge
(); }
93
};
94
95
/* Iterate over adjacent nodes
96
*/
97
class
AdjacentNodeIterator
:
public
OGDFEntryIterator
<adjEntry> {
98
private
:
99
using
parent
=
OGDFEntryIterator<adjEntry>
;
100
101
public
:
102
using
T
=
node
;
103
using
parent::parent;
104
105
node
operator*
() {
return
this->
m_cur
->
twin
()->
theNode
(); }
106
};
107
108
using
AdjEntryIterator
=
EntryIterator<adjEntry>
;
109
using
NodeIterator
=
EntryIterator<node>
;
110
using
EdgeIterator
=
EntryIterator<edge>
;
111
112
113
}
114
}
115
}
116
}
Graph_d.h
Pure declaration header, find template implementation in Graph.h.
ogdf::AdjElement::twin
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
Definition
Graph_d.h:109
ogdf::AdjElement::theEdge
edge theEdge() const
Returns the edge associated with this adjacency entry.
Definition
Graph_d.h:97
ogdf::AdjElement::theNode
node theNode() const
Returns the node whose adjacency list contains this element.
Definition
Graph_d.h:103
ogdf::EdgeElement
Class for the representation of edges.
Definition
Graph_d.h:300
ogdf::NodeElement
Class for the representation of nodes.
Definition
Graph_d.h:177
ogdf::internal::gcm::graph::AdjacentNodeIterator
Definition
ogdf_iterator.h:97
ogdf::internal::gcm::graph::AdjacentNodeIterator::operator*
node operator*()
Definition
ogdf_iterator.h:105
ogdf::internal::gcm::graph::EntryIterator
Definition
ogdf_iterator.h:72
ogdf::internal::gcm::graph::EntryIterator::operator*
Entry operator*()
Definition
ogdf_iterator.h:80
ogdf::internal::gcm::graph::EntryIterator::T
Entry T
Definition
ogdf_iterator.h:77
ogdf::internal::gcm::graph::IncidentEdgeIterator
iterate over incident edges
Definition
ogdf_iterator.h:84
ogdf::internal::gcm::graph::IncidentEdgeIterator::operator*
edge operator*()
Definition
ogdf_iterator.h:92
ogdf::internal::gcm::graph::OGDFEntryIterator
iterate over entries of an ogdf graph
Definition
ogdf_iterator.h:43
ogdf::internal::gcm::graph::OGDFEntryIterator::operator--
Iterator & operator--()
Definition
ogdf_iterator.h:56
ogdf::internal::gcm::graph::OGDFEntryIterator::operator++
Iterator & operator++()
Definition
ogdf_iterator.h:61
ogdf::internal::gcm::graph::OGDFEntryIterator::Entry
_Entry Entry
Definition
ogdf_iterator.h:45
ogdf::internal::gcm::graph::OGDFEntryIterator::OGDFEntryIterator
OGDFEntryIterator(Entry _cur)
Definition
ogdf_iterator.h:52
ogdf::internal::gcm::graph::OGDFEntryIterator::operator==
bool operator==(const Iterator &b) const
Definition
ogdf_iterator.h:66
ogdf::internal::gcm::graph::OGDFEntryIterator::m_cur
Entry m_cur
Definition
ogdf_iterator.h:49
ogdf::internal::gcm::graph::OGDFEntryIterator::operator!=
bool operator!=(const Iterator &b) const
Definition
ogdf_iterator.h:68
ogdf::node
NodeElement * node
The type of nodes.
Definition
Graph_d.h:64
ogdf::edge
EdgeElement * edge
The type of edges.
Definition
Graph_d.h:68
getDoubleFactoredZeroAdjustedMerger
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
Definition
multilevelmixer.cpp:36
ogdf
The namespace for all OGDF objects.
Definition
AugmentationModule.h:36
include
ogdf
geometric
cr_min
graph
ogdf_iterator.h
© 1999–2023
The OGDF Team