Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PALabel.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35
36namespace ogdf {
37
45class PALabel {
46 friend class PlanarAugmentation;
48
49public:
51
57
58 bool isBLabel() { return m_parent != nullptr; }
59
60 bool isCLabel() { return m_parent == nullptr; }
61
63 node getPendant(int nr) { return nr < m_pendants.size() ? *m_pendants.get(nr) : nullptr; }
64
65 node getFirstPendant() { return (m_pendants.size() > 0) ? m_pendants.front() : nullptr; }
66
67 node getLastPendant() { return (m_pendants.size() > 0) ? m_pendants.back() : nullptr; }
68
70 int size() { return m_pendants.size(); }
71
73
75
77 if (m_pendants.size() > 0) {
78 m_pendants.popFront();
79 }
80 }
81
83
84 void deleteAllPendants() { m_pendants.clear(); }
85
87 node parent() { return (m_parent != nullptr) ? m_parent : m_head; }
88
90 node head() { return m_head; }
91
93
95
97
99
101
102private:
110
112
114
118};
119
121
122}
Includes declaration of graph class.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Encapsulates a pointer to a list element.
Definition List.h:103
Class for the representation of nodes.
Definition Graph_d.h:177
auxiliary class for the planar augmentation algorithm
Definition PALabel.h:45
void removePendant(ListIterator< node > it)
Definition PALabel.h:74
bool isBLabel()
Definition PALabel.h:58
node m_head
the cutvertex and perhaps (see m_parent) the parent node
Definition PALabel.h:111
node m_parent
the "parent" of the pendants in the BC-Tree, m_parent is a b-vertex or a c-vertex if it is a b-vertex...
Definition PALabel.h:109
void addPendant(node pendant)
Definition PALabel.h:82
node getPendant(int nr)
return pendant with number nr, starts counting at 0
Definition PALabel.h:63
void stopCause(StopCause sc)
Definition PALabel.h:98
int size()
return number of pendants
Definition PALabel.h:70
node parent()
return the parent node. If the label is a c-label it returns m_head
Definition PALabel.h:87
List< node > m_pendants
list with all pendants of the label
Definition PALabel.h:113
bool isCLabel()
Definition PALabel.h:60
StopCause stopCause()
Definition PALabel.h:96
node getFirstPendant()
Definition PALabel.h:65
void removePendant(node pendant)
void deleteAllPendants()
Definition PALabel.h:84
void setParent(node newParent)
Definition PALabel.h:92
PALabel(node parent, node cutvertex, StopCause sc=StopCause::BDegree)
Definition PALabel.h:52
StopCause m_stopCause
the stop cause that occurs when traversing from the pendants to the bc-tree-root computed in PlanarAu...
Definition PALabel.h:117
node head()
returns the head node
Definition PALabel.h:90
void removeFirstPendant()
Definition PALabel.h:76
node getLastPendant()
Definition PALabel.h:67
void setHead(node newHead)
Definition PALabel.h:94
The algorithm for biconnectivity augmentation with fixed combinatorial embedding.
The algorithm for planar biconnectivity augmentation (Mutzel, Fialko).
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition memory.h:84
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.