33#ifdef OGDF_INCLUDE_CGAL
80 inline const Graph& get_graph() {
return graph; }
88 inline size_t max_node_index()
const {
return graph.maxNodeIndex(); }
90 inline size_t max_edge_index()
const {
return graph.maxEdgeIndex(); }
92 inline Node get_node(
unsigned int i)
const {
93 for (
auto w : nodes()) {
94 if (w->index() == (
int)i) {
108 if (v->degree() < w->degree()) {
109 for (
auto e : edges(v)) {
110 if (e->opposite(v) == w) {
116 for (
auto e : edges(w)) {
117 if (e->opposite(w) == v) {
135 inline datastructure::IteratorRange<NodeIterator> nodes()
const {
137 return datastructure::IteratorRange<NodeIterator>(
NodeIterator(graph.firstNode()),
140 return datastructure::IteratorRange<NodeIterator>(
Node(0),
Node(0));
147 inline datastructure::IteratorRange<EdgeIterator> edges()
const {
149 return datastructure::IteratorRange<EdgeIterator>(
EdgeIterator(graph.firstEdge()),
152 return datastructure::IteratorRange<EdgeIterator>(
Edge(0),
Edge(0));
160 inline datastructure::IteratorRange<IncidentEdgeIterator> edges(
const Node w)
const {
161 if (w->degree() == 0) {
162 return datastructure::IteratorRange<IncidentEdgeIterator>(
165 return datastructure::IteratorRange<IncidentEdgeIterator>(
166 IncidentEdgeIterator(w->firstAdj()), IncidentEdgeIterator(w->lastAdj()->succ()));
175 inline datastructure::IteratorRange<AdjEntryIterator> adj(
const Node w)
const {
176 if (w->degree() == 0) {
180 return datastructure::IteratorRange<AdjEntryIterator>(
AdjEntryIterator(w->firstAdj()),
189 inline datastructure::IteratorRange<AdjacentNodeIterator>
neighbors(
const Node w)
const {
190 if (w->degree() == 0) {
191 return datastructure::IteratorRange<AdjacentNodeIterator>(
195 return datastructure::IteratorRange<AdjacentNodeIterator>(
196 AdjacentNodeIterator(w->firstAdj()), AdjacentNodeIterator(w->lastAdj()->succ()));
Includes declaration of graph class.
Declares class GraphIO which provides access to all graph read and write functionality.
AdjElement * adjEntry
The type of adjacency entries.
NodeElement * node
The type of nodes.
EdgeElement * edge
The type of edges.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
EntryIterator< edge > EdgeIterator
EntryIterator< adjEntry > AdjEntryIterator
EntryIterator< node > NodeIterator
The namespace for all OGDF objects.