Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarSPQRTree.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/List.h>
36#include <ogdf/basic/basic.h>
38
39namespace ogdf {
40class Skeleton;
41template<class E>
42class SListPure;
43
45
58class OGDF_EXPORT PlanarSPQRTree : public virtual SPQRTree {
59public:
60 //
61 // a) Access operations
62 //
63
65 double numberOfEmbeddings() const { return numberOfEmbeddings(rootNode()); }
66
68
71 double numberOfEmbeddings(node v) const;
72
74
78 long long numberOfNodeEmbeddings(node vT) const;
79
80 //
81 // b) Update operations
82 //
83
85
89 void reverse(node vT);
90
92
96 void swap(node vT, edge e1, edge e2);
97
99
103 void swap(node vT, adjEntry adj1, adjEntry adj2);
104
106
109 void embed(Graph& G);
110
113
115
119 randomEmbed();
120 embed(G);
121 }
122
124
128
130
136
138
142 void embed(node& vT, long long x);
143
144
145protected:
147 void init(bool isEmbedded);
150 NodeArray<adjEntry>& lastAdj, SListPure<node>& current, const Skeleton& S, adjEntry adj);
151
152 // Embeda original graph according to embeddings of skeletons.
155
156 // Enumeration of all embeddings
158 void reverse(node& nP, adjEntry& first, adjEntry& last);
161
163};
164
165}
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
Declaration of class SPQRTree.
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Class for the representation of edges.
Definition Graph_d.h:364
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Encapsulates a pointer to a list element.
Definition List.h:113
Class for the representation of nodes.
Definition Graph_d.h:241
SPQR-trees of planar graphs.
void createInnerVerticesEmbed(Graph &G, node vT)
void setPosInEmbedding(NodeArray< SListPure< adjEntry > > &adjEdges, NodeArray< node > &currentCopy, NodeArray< adjEntry > &lastAdj, SListPure< node > &current, const Skeleton &S, adjEntry adj)
void embed(Graph &G)
Embeds G according to the current embeddings of the skeletons of T.
bool nextEmbedding(Graph &G)
Embeds the original graph G with the next embedding.
bool nextEmbedding(node &vT)
void reverse(node vT)
Flips the skeleton S of vT around its poles.
void randomEmbed(Graph &G)
Embeds all skeleton graphs randomly and embeds G according to the embeddings of the skeletons.
double numberOfEmbeddings(node v) const
Returns the number of possible embeddings of the pertinent graph of node v.
void reverse(node &nP, adjEntry &first, adjEntry &last)
void swap(node vT, adjEntry adj1, adjEntry adj2)
Exchanges the positions of the two edges corresponding to adj1 and adj2 in skeleton of vT.
long long numberOfNodeEmbeddings(node vT) const
Returns the number of possible embeddings of the skeleton of node vT.
bool nextEmbedding(ListIterator< node > it)
void firstEmbedding(node &vT)
void firstEmbedding(Graph &G)
Embeds the original graph G canonically by the indices of their adjEntries.
void randomEmbed()
Embeds all skeleton graphs randomly.
void swap(node vT, edge e1, edge e2)
Exchanges the positions of edges e1 and e2 in skeleton of vT.
double numberOfEmbeddings() const
Returns the number of possible embeddings of G.
void expandVirtualEmbed(node vT, adjEntry adjVirt, SListPure< adjEntry > &adjEdges)
void embed(node &vT, long long x)
Embeds the skeleton of the node vT with the specific embedding numbered by x.
void init(bool isEmbedded)
Initialization (adaption of embeding).
Singly linked lists.
Definition SList.h:191
Linear-time implementation of static SPQR-trees.
Definition SPQRTree.h:73
Skeleton graphs of nodes in an SPQR-tree.
Definition Skeleton.h:60
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.