Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
UpwardPlanaritySingleSource.h
Go to the documentation of this file.
1
34#pragma once
35
37#include <ogdf/basic/Graph.h>
38#include <ogdf/basic/basic.h>
39
40namespace ogdf {
41class ExpansionGraph;
42class FaceSinkGraph;
43class SPQRTree;
44class StaticPlanarSPQRTree;
45template<class E>
46class SList;
47template<class E>
48class SListPure;
49
52public:
53 // test and compute adjacency lists of embedding
54 static bool testAndFindEmbedding(const Graph& G, bool embed,
55 NodeArray<SListPure<adjEntry>>& adjacentEdges);
56
57 // embed and compute st-augmentation (new implementation - inserts only
58 // one new node into G which is the super sink)
59 static void embedAndAugment(Graph& G, NodeArray<SListPure<adjEntry>>& adjacentEdges,
60 bool augment, node& superSink, SList<edge>& augmentedEdges);
61
62private:
69
71 class ConstraintRooting;
72 // classes defined and used in UpwardPlanaritySingleSource.cpp
73 class SkeletonInfo;
74
75
76 // performs the actual test (and computation of sorted adjacency lists) for
77 // each biconnected component
78 static bool testBiconnectedComponent(ExpansionGraph& exp, node sG, int parentBlock, bool embed,
79 NodeArray<SListPure<adjEntry>>& adjacentEdges);
80
83
84 // compute sT-skeletons
85 // test for upward-planarity, build constraints for rooting, and find a
86 // rooting of the tree satisfying all constraints
87 // returns true iff such a rooting exists
89
90 // precompute information: in-/outdegrees in pertinent graph, contains
91 // pertinent graph the source?
92 static void computeDegreesInPertinent(const SPQRTree& T, node s,
93 NodeArray<SkeletonInfo>& skInfo, node vT);
94
98
99 static bool initFaceSinkGraph(const Graph& M, SkeletonInfo& skInfo);
100
102 node vT, bool extFaceIsLeft);
103
107
108 static void assignSinks(FaceSinkGraph& F, face extFace, NodeArray<face>& assignedFace);
109
111 node v, // current node
112 node parent, // its parent
113 NodeArray<face>& assignedFace);
114
118
120
122
124};
125
126}
Declaration of CombinatorialEmbedding and face.
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
Represents expansion graph of each biconnected component of a given digraph, i.e.,...
Faces in a combinatorial embedding.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Class for the representation of nodes.
Definition Graph_d.h:241
Singly linked lists (maintaining the length of the list).
Definition SList.h:845
Singly linked lists.
Definition SList.h:191
Linear-time implementation of static SPQR-trees.
Definition SPQRTree.h:73
SPQR-trees of planar graphs.
Performs upward planarity testing and embedding for single-source digraphs.
static node dfsAssignSinks(FaceSinkGraph &F, node v, node parent, NodeArray< face > &assignedFace)
static void embedAndAugment(Graph &G, NodeArray< SListPure< adjEntry > > &adjacentEdges, bool augment, node &superSink, SList< edge > &augmentedEdges)
static bool testBiconnectedComponent(ExpansionGraph &exp, node sG, int parentBlock, bool embed, NodeArray< SListPure< adjEntry > > &adjacentEdges)
static bool initFaceSinkGraph(const Graph &M, SkeletonInfo &skInfo)
static void embedSkeleton(Graph &G, StaticPlanarSPQRTree &T, NodeArray< SkeletonInfo > &skInfo, node vT, bool extFaceIsLeft)
static edge directSkeletons(SPQRTree &T, NodeArray< SkeletonInfo > &skInfo)
static bool checkDegrees(SPQRTree &T, node s, NodeArray< SkeletonInfo > &skInfo)
static bool virtualEdgesDirectedEqually(const SPQRTree &T)
static void computeDegreesInPertinent(const SPQRTree &T, node s, NodeArray< SkeletonInfo > &skInfo, node vT)
static bool testAndFindEmbedding(const Graph &G, bool embed, NodeArray< SListPure< adjEntry > > &adjacentEdges)
static void assignSinks(FaceSinkGraph &F, face extFace, NodeArray< face > &assignedFace)
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.