Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanarAugmentation.h
Go to the documentation of this file.
1
32#pragma once
33
36#include <ogdf/basic/SList.h>
38
39namespace ogdf {
40
60public:
63
66
67protected:
74 virtual void doCall(Graph& G, List<edge>& list) override;
75
76
77private:
79 int m_nPlanarityTests = 0;
80
82 Graph* m_pGraph = nullptr;
83
85 DynamicBCTree* m_pBCTree = nullptr;
86
88 List<edge>* m_pResult = nullptr;
89
92
95
98
101
104
113
114private:
116 void augment();
117
120
129
140
149
158
161
165
168
175
178
180 void joinPendants(pa_label& label);
181
184
191
193 void deleteLabel(pa_label& label, bool removePendants = true);
194
201
204
215
218
226
229
236
238 void terminate();
239};
240
241}
Declaration of interface for graph augmentation algorithms.
Declaration of class DynamicBCTree.
Declares auxiliary structure of planar augmentation algorithms.
Declaration of singly linked lists and iterators.
The base class for graph augmentation algorithms.
Dynamic BC-trees.
Class for the representation of edges.
Definition Graph_d.h:300
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Encapsulates a pointer to a list element.
Definition List.h:103
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
auxiliary class for the planar augmentation algorithm
Definition PALabel.h:45
The algorithm for planar biconnectivity augmentation (Mutzel, Fialko).
PALabel::StopCause followPath(node v, node &last)
Traverses to the root and checks several stop conditions.
void augment()
The main function for planar augmentation.
PlanarAugmentation()
Creates an instance of the planar augmentation algorithm.
List< node > m_pendants
The list of all pendants (leaves in the BC-Tree).
NodeArray< ListIterator< pa_label > > m_isLabel
The list iterator in m_labels if the node in the BC-Tree is a label.
NodeArray< SList< adjEntry > > m_adjNonChildren
Stores for each node of the bc-tree the children that have an adjacent bc-node that doesn't belong to...
List< pa_label > m_labels
The list of all labels, sorted by size (decreasing).
void updateAdjNonChildren(node newBlock, SList< node > &path)
Updates m_adjNonChildren.
bool planarityCheck(node v1, node v2)
Checks planarity for a new edge (v1, v2) in the original graph.
void connectLabels(pa_label first, pa_label second)
Inserts edges between pendants of label first and second.
NodeArray< pa_label > m_belongsTo
The label a BC-Node belongs to.
void connectInsideLabel(pa_label &label)
Connects the only pendant of label with a computed ancestor.
void deletePendant(node pendant, bool removeFromLabel=true)
Deletes the pendant pendant, and, if removeFromLabel is true, removes it from the corresponding label...
void updateNewEdges(const SList< edge > &newEdges)
Major updates caused by the new edges.
List< node > m_pendantsToDel
The list of pendants that has to be deleted after each reduceChain.
node adjToCutvertex(node v, node cutvertex=nullptr)
Returns a node that belongs to bc-node v and is adjacent to cutvertex.
void makeConnectedByPendants()
Makes the graph connected by new edges between pendants of the connected components.
node findLastBefore(node pendant, node ancestor)
Traverses from pendant to ancestor and returns the last node before ancestor on the path.
void terminate()
Cleanup.
void joinPendants(pa_label &label)
Connects all pendants of label with new edges.
void reduceChain(node pendant, pa_label labelOld=nullptr)
Traverses to the root and creates a label or updates one.
bool findMatching(pa_label &first, pa_label &second)
Finds two matching labels, so all pendants can be connected without losing planarity.
ListIterator< pa_label > insertLabel(pa_label label)
Inserts label into m_labels by decreasing order.
edge connectPendants(node pendant1, node pendant2)
Connects two pendants.
bool connectCondition(pa_label a, pa_label b)
Checks if the pendants of label a and label b can be connected without creating a new pendant.
void addPendant(node pendant, pa_label &label)
Adds pendant to label and updates the label-order.
virtual void doCall(Graph &G, List< edge > &list) override
The implementation of the algorithm call.
pa_label newLabel(node cutvertex, node pendant, PALabel::StopCause whyStop)
Creates a new label and inserts it into m_labels.
void modifyBCRoot(node oldRoot, node newRoot)
Modifies the root of the BC-Tree that newRoot replaces oldRoot.
void deleteLabel(pa_label &label, bool removePendants=true)
Deletes label.
void removeAllPendants(pa_label &label)
Removes all pendants of label.
Singly linked lists (maintaining the length of the list).
Definition SList.h:833
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.