Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

UpwardPlanarityEmbeddedDigraph.h
Go to the documentation of this file.
1 
34 #pragma once
35 
37 #include <ogdf/basic/Graph.h>
38 
39 namespace ogdf {
40 template<class E, class INDEX>
41 class ArrayBuffer;
42 template<class E>
43 class List;
44 
46 public:
47  //constructor
48  explicit UpwardPlanarityEmbeddedDigraph(const Graph& H);
49 
50 private:
51  //copy of the Input-Graph
52  const Graph& m_G;
53  //super-source and super-sink of the flow-network
55  //flow-network
57  //combinatorial embedding of G
59  //flow-values of the faces
61  //annotations for the construction of the flow-network
67 
68 public:
69  //tests whether the embedded Digraph is upward planar by using the private class methods
70  //returns true iff G is upward planar observing the fixed embedding
72  //get the set of feasible external faces (represented by the first AdjEntry) if G is upward planar observing the fixed embedding
73  bool isUpwardPlanarEmbedded(List<adjEntry>& possibleExternalFaces);
74 
75 private:
76  //tests whether the embedded Digraph is upward planar
77  //val = true forces a break if the first feasible external face was found
78  void isUpwardPlanarEmbedded(const bool val, List<adjEntry>& possibleExternalFaces);
79  //constructs flow-network of the corresponding Graph G
80  void constructNetwork(EdgeArray<int>& capacity, EdgeArray<int>& flow);
81  //tests whether a flow of power r is possible in the flow-network by executing augmentation steps
82  bool isFlow(EdgeArray<int>& capacity, EdgeArray<int>& flow, const int r);
83  //returns a feasible augmentation path
84  void getPath(ArrayBuffer<node>& st, EdgeArray<int>& capacity, EdgeArray<int>& flow);
85  //returns the value for one augmentation step
86  int getMin(ArrayBuffer<node> stack, EdgeArray<int>& capacity, EdgeArray<int>& flow);
87 };
88 
89 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:53
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::UpwardPlanarityEmbeddedDigraph::m_assignedSourcesAndSinks
FaceArray< List< node > > m_assignedSourcesAndSinks
Definition: UpwardPlanarityEmbeddedDigraph.h:62
ogdf::UpwardPlanarityEmbeddedDigraph::constructNetwork
void constructNetwork(EdgeArray< int > &capacity, EdgeArray< int > &flow)
Graph.h
Includes declaration of graph class.
ogdf::UpwardPlanarityEmbeddedDigraph::m_correspondingFaceNode
FaceArray< node > m_correspondingFaceNode
Definition: UpwardPlanarityEmbeddedDigraph.h:65
ogdf::UpwardPlanarityEmbeddedDigraph::m_combEmb
const ConstCombinatorialEmbedding m_combEmb
Definition: UpwardPlanarityEmbeddedDigraph.h:58
ogdf::UpwardPlanarityEmbeddedDigraph::isFlow
bool isFlow(EdgeArray< int > &capacity, EdgeArray< int > &flow, const int r)
ogdf::UpwardPlanarityEmbeddedDigraph
Definition: UpwardPlanarityEmbeddedDigraph.h:45
ogdf::UpwardPlanarityEmbeddedDigraph::m_t
node m_t
Definition: UpwardPlanarityEmbeddedDigraph.h:54
ogdf::UpwardPlanarityEmbeddedDigraph::m_G
const Graph & m_G
Definition: UpwardPlanarityEmbeddedDigraph.h:52
r
int r[]
Definition: hierarchical-ranking.cpp:13
ogdf::UpwardPlanarityEmbeddedDigraph::m_s
node m_s
Definition: UpwardPlanarityEmbeddedDigraph.h:54
ogdf::UpwardPlanarityEmbeddedDigraph::UpwardPlanarityEmbeddedDigraph
UpwardPlanarityEmbeddedDigraph(const Graph &H)
ogdf::UpwardPlanarityEmbeddedDigraph::getMin
int getMin(ArrayBuffer< node > stack, EdgeArray< int > &capacity, EdgeArray< int > &flow)
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
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::FaceArrayBase
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
Definition: CombinatorialEmbedding.h:181
ogdf::UpwardPlanarityEmbeddedDigraph::m_correspondingEdge
NodeArray< edge > m_correspondingEdge
Definition: UpwardPlanarityEmbeddedDigraph.h:66
ogdf::UpwardPlanarityEmbeddedDigraph::m_B
Graph m_B
Definition: UpwardPlanarityEmbeddedDigraph.h:56
ogdf::UpwardPlanarityEmbeddedDigraph::isUpwardPlanarEmbedded
bool isUpwardPlanarEmbedded()
ogdf::ConstCombinatorialEmbedding
Combinatorial embeddings of planar graphs.
Definition: CombinatorialEmbedding.h:216
ogdf::UpwardPlanarityEmbeddedDigraph::m_correspondingFace
NodeArray< face > m_correspondingFace
Definition: UpwardPlanarityEmbeddedDigraph.h:64
CombinatorialEmbedding.h
Declaration of CombinatorialEmbedding and face.
ogdf::UpwardPlanarityEmbeddedDigraph::m_correspondingSourceOrSink
NodeArray< node > m_correspondingSourceOrSink
Definition: UpwardPlanarityEmbeddedDigraph.h:63
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::UpwardPlanarityEmbeddedDigraph::m_A
FaceArray< int > m_A
Definition: UpwardPlanarityEmbeddedDigraph.h:60
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::UpwardPlanarityEmbeddedDigraph::getPath
void getPath(ArrayBuffer< node > &st, EdgeArray< int > &capacity, EdgeArray< int > &flow)