Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Universal.h
Go to the documentation of this file.
1
31#pragma once
32
34#include <ogdf/basic/Graph.h>
36
37namespace ogdf {
38namespace internal {
39namespace gcm {
40namespace tools {
41
42inline bool equal(const node a, const node b) { return a->index() == b->index(); }
43
44inline bool equal(const edge& a, const edge& b) {
45 return equal(a->source(), b->source()) && equal(a->target(), b->target());
46}
47
48inline bool equal(const face& a, const face& b) { return a->index() == b->index(); }
49
50inline std::vector<node> nodes_of_face(const face& face) {
51 std::vector<node> nodes;
52 adjEntry first = face->firstAdj();
53 adjEntry current = first;
54
55 do {
56 nodes.push_back(current->theEdge()->source());
58 } while (current != first && current != NULL);
59 return nodes;
60}
61
62}
63}
64}
65}
Declaration of CombinatorialEmbedding and face.
Includes declaration of graph class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Class for adjacency list elements.
Definition Graph_d.h:79
Class for the representation of edges.
Definition Graph_d.h:300
node target() const
Returns the target node of the edge.
Definition Graph_d.h:338
node source() const
Returns the source node of the edge.
Definition Graph_d.h:335
Faces in a combinatorial embedding.
adjEntry nextFaceEdge(adjEntry adj) const
Returns the successor of adj in the list of all adjacency elements in the face.
adjEntry firstAdj() const
Returns the first adjacency element in the face.
int index() const
Returns the index of the face.
Class for the representation of nodes.
Definition Graph_d.h:177
int index() const
Returns the (unique) node index.
Definition Graph_d.h:211
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
bool equal(const node a, const node b)
Definition Universal.h:42
std::vector< node > nodes_of_face(const face &face)
Definition Universal.h:50
The namespace for all OGDF objects.