60 SComp =
static_cast<int>(
61 SPQRTree::NodeType::SNode),
62 PComp =
static_cast<int>(
63 SPQRTree::NodeType::PNode),
64 RComp =
static_cast<int>(
65 SPQRTree::NodeType::RNode)
160 m_tNode_owner[vT] = vT;
161 m_tNode_type[vT] = spqrNodeType;
164 if (spqrNodeType == TNodeType::PComp) {
166 }
else if (spqrNodeType == TNodeType::SComp) {
168 }
else if (spqrNodeType == TNodeType::RComp) {
182 m_hEdge_position[eH] = m_tNode_hEdges[vT]->pushBack(eH);
183 m_hEdge_tNode[eH] = vT;
194 m_tNode_hEdges[vT]->del(m_hEdge_position[eH]);
208 m_hEdge_twinEdge[eH] = fH;
209 m_hEdge_twinEdge[fH] = eH;
329 for (
auto pList : m_tNode_hEdges) {
405 edge p_e = m_tNode_hRefEdge[vT];
406 if (p_e ==
nullptr) {
409 edge p_et = twinEdge(p_e);
411 node p = m_hEdge_tNode[p_et];
Declaration of class DynamicBCTree.
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
Declaration of class SPQRTree.
Basic declarations, included by all source files.
Graph m_T
A Graph structure containing all SPQR-trees.
int numberOfSNodes(node vB) const
Returns the number of S-nodes in the SPQR-tree for a given B-component of the BC-tree.
node spqrroot(node vB) const
Returns the root of the SPQR-tree for a given B-component of the BC-tree.
void delHEdge(edge eH, node vT) const
Deletes edge eH from m_H and removes its connection to a vertex vT of the SPQRForest.
node spqrNodeOf(edge eH) const
The SPQR-tree-vertex which a real or virtual edge eH belongs to, if the SPQR-tree has been created us...
NodeArray< int > m_bNode_numS
The numbers of S-components.
void addHEdge(edge eH, node vT) const
Adds edge eH to a vertex vT of the SPQRForest.
NodeArray< TNodeType > m_tNode_type
The types of the SPQR-tree-vertices.
node updateInsertedNode(edge eG, edge fG) override
Updates the whole data structure after a new vertex has been inserted into the original graph by spli...
EdgeArray< ListIterator< edge > > m_hEdge_position
The positions of real and virtual edges in their m_tNode_hEdges lists.
edge updateInsertedEdgeSPQR(node vB, edge eG)
int numberOfRNodes(node vB) const
Returns the number of R-nodes in the SPQR-tree for a given B-component of the BC-tree.
NodeArray< List< edge > * > m_tNode_hEdges
Lists of real and virtual edges belonging to SPQR-tree vertices.
NodeArray< node > m_bNode_SPQR
SList< node > & findPathSPQR(node sH, node tH) const
Finds the shortest path between the two sets of SPQR-tree-vertices which sH and tH are belonging to.
node findSPQR(node vT) const
Finds the proper representative of an SPQR-tree-vertex (FIND part of UNION/FIND).
node updateInsertedNodeSPQR(node vB, edge eG, edge fG)
Updates an SPQR-tree after a new vertex has been inserted into the original graph by splitting an edg...
DynamicSPQRForest(Graph &G, node vG, bool not_connected=false)
A constructor.
void init()
Initialization.
const List< edge > & hEdgesSPQR(node vT) const
Returns a linear list of the edges in m_H belonging to the triconnected component represented by a gi...
edge updateInsertedEdge(edge eG) override
NodeArray< bool > m_tNode_isMarked
Auxiliary array used by findNCASPQR()
node uniteSPQR(node vB, node sT, node tT)
int numberOfPNodes(node vB) const
Returns the number of P-nodes in the SPQR-tree for a given B-component of the BC-tree.
node spqrproper(edge eH) const
const Graph & spqrTree() const
Returns the SPQR-tree graph.
NodeArray< int > m_bNode_numP
The numbers of P-components.
node spqrParent(node vT) const
Returns the parent node of a node of the SPQR-tree Graph, or nullptr if vT is a root.
void createSPQR(node vB) const
Creates the SPQR-tree for a given B-component of the BC-tree.
EdgeArray< node > m_hEdge_tNode
The SPQR-tree-vertices which the real and virtual edges are belonging to.
NodeArray< node > m_tNode_owner
The owners of the SPQR-tree-vertices in the UNION/FIND structure.
TNodeType typeOfTNode(node vT) const
edge virtualEdge(node vT, node wT) const
Returns the virtual edge which leads from one vertex of an SPQR-tree to another one.
edge twinEdge(edge eH) const
Returns the twin edge of a given edge of m_H, if it is virtual, or nullptr, if it is real.
node newSPQRNode(node vB, const TNodeType spqrNodeType) const
Creates a new node in the SPQR-tree for a given B-component of the BC-tree.
SList< node > & findPathSPQR(node sH, node tH, node &rT) const
Finds the shortest path between the two sets of SPQR-tree-vertices which sH and tH are belonging to.
node findNCASPQR(node sT, node tT) const
edge spqrParentEdge(node vT) const
Returns the virtual edge leading to the parents of a SPQR-tree vertex, or nullptr if vT is a root.
NodeArray< edge > m_tNode_hRefEdge
The virtual edges leading to the parents of the SPQR-tree vertices.
NodeArray< node > m_htogc
Auxiliary array used by createSPQR().
edge newTwinEdge(edge eH, node vT) const
Creates a twin edge for eH, adds it to vT and returns it.
NodeArray< int > m_bNode_numR
The numbers of R-components.
DynamicSPQRForest(Graph &G, bool not_connected=false)
A constructor.
TNodeType
Enumeration type for characterizing the SPQR-tree-vertices.
EdgeArray< edge > m_hEdge_twinEdge
The partners of virtual edges (nullptr if real).
Class for the representation of edges.
node target() const
Returns the target node of the edge.
node source() const
Returns the source node of the edge.
Data type for general directed graphs (adjacency list representation).
node newNode(int index=-1)
Creates a new node and returns it.
edge searchEdge(node v, node w, bool directed=false) const
Searches and returns an edge connecting nodes v and w in time O( min(deg(v ), deg(w ))).
Doubly linked lists (maintaining the length of the list).
Class for the representation of nodes.
Singly linked lists (maintaining the length of the list).
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.