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