Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
40 namespace ogdf {
41 class ExpansionGraph;
42 class FaceSinkGraph;
43 class SPQRTree;
44 class StaticPlanarSPQRTree;
45 template<class E>
46 class SList;
47 template<class E>
48 class SListPure;
49 
52 public:
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 
62 private:
63  struct DegreeInfo {
68  };
69 
71  class ConstraintRooting;
72  // classes defined and used in UpwardPlanaritySingleSource.cpp
73  class OGDF_EXPORT 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
88  static edge directSkeletons(SPQRTree& T, NodeArray<SkeletonInfo>& skInfo);
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 
101  static void embedSkeleton(Graph& G, StaticPlanarSPQRTree& T, NodeArray<SkeletonInfo>& skInfo,
102  node vT, bool extFaceIsLeft);
103 
107 
108  static void assignSinks(FaceSinkGraph& F, face extFace, NodeArray<face>& assignedFace);
109 
110  static node dfsAssignSinks(FaceSinkGraph& F,
111  node v, // current node
112  node parent, // its parent
113  NodeArray<face>& assignedFace);
114 
118 
119  static bool checkDegrees(SPQRTree& T, node s, NodeArray<SkeletonInfo>& skInfo);
120 
121  static bool virtualEdgesDirectedEqually(const SPQRTree& T);
122 
124 };
125 
126 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::UpwardPlanaritySingleSource::DegreeInfo::m_indegTgt
int m_indegTgt
Definition: UpwardPlanaritySingleSource.h:66
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::UpwardPlanaritySingleSource::DegreeInfo::m_outdegTgt
int m_outdegTgt
Definition: UpwardPlanaritySingleSource.h:67
ogdf::SPQRTree
Linear-time implementation of static SPQR-trees.
Definition: SPQRTree.h:73
ogdf::UpwardPlanaritySingleSource::DegreeInfo::m_indegSrc
int m_indegSrc
Definition: UpwardPlanaritySingleSource.h:64
ogdf::UpwardPlanaritySingleSource
Performs upward planarity testing and embedding for single-source digraphs.
Definition: UpwardPlanaritySingleSource.h:51
ogdf::SListPure
Singly linked lists.
Definition: SList.h:52
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::StaticPlanarSPQRTree
SPQR-trees of planar graphs.
Definition: StaticPlanarSPQRTree.h:55
basic.h
Basic declarations, included by all source files.
ogdf::FaceSinkGraph
Definition: FaceSinkGraph.h:44
CombinatorialEmbedding.h
Declaration of CombinatorialEmbedding and face.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::UpwardPlanaritySingleSource::DegreeInfo::m_outdegSrc
int m_outdegSrc
Definition: UpwardPlanaritySingleSource.h:65
ogdf::ExpansionGraph
Represents expansion graph of each biconnected component of a given digraph, i.e.,...
Definition: ExpansionGraph.h:50
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::FaceElement
Faces in a combinatorial embedding.
Definition: CombinatorialEmbedding.h:118
ogdf::UpwardPlanaritySingleSource::DegreeInfo
Definition: UpwardPlanaritySingleSource.h:63