Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

UpwardPlanarityEmbeddedDigraph.h
Go to the documentation of this file.
1 
34 #pragma once
35 
36 #include <ogdf/basic/Graph_d.h>
37 #include <ogdf/basic/Graph.h>
38 #include <ogdf/basic/Stack.h>
39 #include <ogdf/basic/List.h>
40 #include <ogdf/basic/FaceArray.h>
42 
43 namespace ogdf {
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(Stack<node> &st, EdgeArray<int> &capacity, EdgeArray<int> &flow);
85  //returns the value for one augmentation step
86  int getMin(Stack<node> stack, EdgeArray<int> &capacity, EdgeArray<int> &flow);
87 };
88 
89 } // end namespace ogdf
void getPath(Stack< node > &st, EdgeArray< int > &capacity, EdgeArray< int > &flow)
void constructNetwork(EdgeArray< int > &capacity, EdgeArray< int > &flow)
bool isFlow(EdgeArray< int > &capacity, EdgeArray< int > &flow, const int r)
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
Combinatorial embeddings of planar graphs.
declaration and implementation of FaceArray class
Declaration of CombinatorialEmbedding and face.
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:423
int getMin(Stack< node > stack, EdgeArray< int > &capacity, EdgeArray< int > &flow)
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
Class for the representation of nodes.
Definition: Graph_d.h:167
Pure declaration header, find template implementation in Graph.h.
Includes declaration of graph class.
The namespace for all OGDF objects.
UpwardPlanarityEmbeddedDigraph(const Graph &H)
const ConstCombinatorialEmbedding m_combEmb
Declaration of doubly linked lists and iterators.
The parameterized class Stack<E> implements list-based stacks.
Definition: Stack.h:192
Declaration and implementation of list-based stacks (StackPure<E> and Stack<E>).