Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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 {
54 public:
55  //
56  // a) Access operations
57  //
58 
60  double numberOfEmbeddings() const {
61  return numberOfEmbeddings(rootNode());
62  }
63 
65 
68  double numberOfEmbeddings(node v) const;
69 
71 
75  long long numberOfNodeEmbeddings(node vT) const;
76 
77  //
78  // b) Update operations
79  //
80 
82 
86  void reverse(node vT);
87 
89 
93  void swap(node vT, edge e1, edge e2);
94 
96 
100  void swap(node vT, adjEntry adj1, adjEntry adj2);
101 
103 
106  void embed(Graph &G);
107 
109  void randomEmbed();
110 
112 
115  void randomEmbed(Graph &G) {
116  randomEmbed();
117  embed(G);
118  }
119 
121 
124  void firstEmbedding(Graph &G);
125 
127 
132  bool nextEmbedding(Graph &G);
133 
135 
139  void embed(node &vT, long long x);
140 
141 
142 protected:
144  void init(bool isEmbedded);
145  void adoptEmbedding();
146  void setPosInEmbedding(
147  NodeArray<SListPure<adjEntry> > &adjEdges,
148  NodeArray<node> &currentCopy,
149  NodeArray<adjEntry> &lastAdj,
150  SListPure<node> &current,
151  const Skeleton &S,
152  adjEntry adj);
153 
154  // Embeda original graph according to embeddings of skeletons.
155  void expandVirtualEmbed(node vT,
156  adjEntry adjVirt,
157  SListPure<adjEntry> &adjEdges);
158  void createInnerVerticesEmbed(Graph &G, node vT);
159 
160  // Enumeration of all embeddings
161  void firstEmbedding(node &vT);
162  void reverse(node &nP,
163  adjEntry &first,
164  adjEntry &last);
165  bool nextEmbedding(node &vT);
166  bool nextEmbedding(ListIterator<node> it);
167 
169 };
170 
171 }
void randomEmbed(Graph &G)
Embeds all skeleton graphs randomly and embeds G according to the embeddings of the skeletons...
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Singly linked lists.
Definition: SList.h:38
void init()
Definition: graphics.h:472
Skeleton graphs of nodes in an SPQR-tree.
Definition: Skeleton.h:61
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
Class for the representation of edges.
Definition: Graph_d.h:292
double numberOfEmbeddings() const
Returns the number of possible embeddings of G.
Class for the representation of nodes.
Definition: Graph_d.h:169
Declaration of class SPQRTree.
Encapsulates a pointer to a list element.
Definition: List.h:42
SPQR-trees of planar graphs.
Linear-time implementation of static SPQR-trees.
Definition: SPQRTree.h:71
The namespace for all OGDF objects.
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
Definition: Reverse.h:75
Class for adjacency list elements.
Definition: Graph_d.h:79