Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarSPQRTree.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
39 
52 class OGDF_EXPORT PlanarSPQRTree : public virtual SPQRTree {
53 public:
54  //
55  // a) Access operations
56  //
57 
59  double numberOfEmbeddings() const { return numberOfEmbeddings(rootNode()); }
60 
62 
65  double numberOfEmbeddings(node v) const;
66 
68 
72  long long numberOfNodeEmbeddings(node vT) const;
73 
74  //
75  // b) Update operations
76  //
77 
79 
83  void reverse(node vT);
84 
86 
90  void swap(node vT, edge e1, edge e2);
91 
93 
97  void swap(node vT, adjEntry adj1, adjEntry adj2);
98 
100 
103  void embed(Graph& G);
104 
106  void randomEmbed();
107 
109 
112  void randomEmbed(Graph& G) {
113  randomEmbed();
114  embed(G);
115  }
116 
118 
121  void firstEmbedding(Graph& G);
122 
124 
129  bool nextEmbedding(Graph& G);
130 
132 
136  void embed(node& vT, long long x);
137 
138 
139 protected:
141  void init(bool isEmbedded);
142  void adoptEmbedding();
143  void setPosInEmbedding(NodeArray<SListPure<adjEntry>>& adjEdges, NodeArray<node>& currentCopy,
144  NodeArray<adjEntry>& lastAdj, SListPure<node>& current, const Skeleton& S, adjEntry adj);
145 
146  // Embeda original graph according to embeddings of skeletons.
147  void expandVirtualEmbed(node vT, adjEntry adjVirt, SListPure<adjEntry>& adjEdges);
148  void createInnerVerticesEmbed(Graph& G, node vT);
149 
150  // Enumeration of all embeddings
151  void firstEmbedding(node& vT);
152  void reverse(node& nP, adjEntry& first, adjEntry& last);
153  bool nextEmbedding(node& vT);
154  bool nextEmbedding(ListIterator<node> it);
155 
157 };
158 
159 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
SPQRTree.h
Declaration of class SPQRTree.
ogdf::SPQRTree
Linear-time implementation of static SPQR-trees.
Definition: SPQRTree.h:70
ogdf::PlanarSPQRTree::numberOfEmbeddings
double numberOfEmbeddings() const
Returns the number of possible embeddings of G.
Definition: PlanarSPQRTree.h:59
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::reverse
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
Definition: Reverse.h:74
ogdf::PlanarSPQRTree
SPQR-trees of planar graphs.
Definition: PlanarSPQRTree.h:52
ogdf::PlanarSPQRTree::m_finished
bool m_finished
Definition: PlanarSPQRTree.h:156
ogdf::SListPure
Singly linked lists.
Definition: SList.h:39
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::PlanarSPQRTree::randomEmbed
void randomEmbed(Graph &G)
Embeds all skeleton graphs randomly and embeds G according to the embeddings of the skeletons.
Definition: PlanarSPQRTree.h:112
ogdf::graphics::init
void init()
Definition: graphics.h:446
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::Skeleton
Skeleton graphs of nodes in an SPQR-tree.
Definition: Skeleton.h:59
ogdf::ListIteratorBase
Encapsulates a pointer to a list element.
Definition: List.h:46
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233