Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

FixedEmbeddingUpwardEdgeInserter.h
Go to the documentation of this file.
1 
32 #pragma once
33 
37 
38 
39 
40 namespace ogdf {
41 
42 
45 {
46 public:
49 
51 
52 
53 private:
54 
56  {
58  }
59 
69  virtual ReturnType doCall(UpwardPlanRep &UPR,
70  const List<edge> &origEdges,
71  const EdgeArray<int> *costOrig = nullptr,
72  const EdgeArray<bool> *forbiddenEdgeOrig = nullptr
73  ) override;
74 
75 
76  ReturnType insertAll(UpwardPlanRep &UPR,
77  List<edge> &toInsert,
78  EdgeArray<int> &cost);
79 
80 
82  void staticLock(UpwardPlanRep &UPR, EdgeArray<bool> &locked, const List<edge> &origEdges, edge e_orig);
83 
85  void dynamicLock(UpwardPlanRep &UPR, EdgeArray<bool> &locked, face f, adjEntry e_cur);
86 
87  void nextFeasibleEdges(UpwardPlanRep &UPR, List<adjEntry> &nextEdges, face f, adjEntry e_cur, EdgeArray<bool> &locked, bool heuristic);
88 
90  void minFIP(UpwardPlanRep &UPR,
91  List<edge> &origEdges,
92  EdgeArray<int> &cost,
93  edge e_orig,
94  SList<adjEntry> &path) { getPath(UPR, origEdges, cost, e_orig, path, false); }
95 
96 
97 
100  List<edge> &origEdges,
101  EdgeArray<int> &cost,
102  edge e_orig,
103  SList<adjEntry> &path) { getPath(UPR, origEdges, cost, e_orig, path, true); }
104 
106  void getPath(UpwardPlanRep &UPR,
107  List<edge> &origEdges,
108  EdgeArray<int> &cost,
109  edge e_orig,
110  SList<adjEntry> &path,
111  bool heuristic);
112 
113 
115  void markUp(const Graph &G, node v, EdgeArray<bool> &markedEdges);
116 
117 
119  void markDown(const Graph &G, node v, EdgeArray<bool> &markedEdges);
120 
122  void feasibleEdges(UpwardPlanRep &UPR,
123  face f, // current face
124  adjEntry adj, // current adjEntry, right face muss be f
125  EdgeArray<bool> &locked, // we compute the dyn. locked edges on the fly with respect to e
126  List<adjEntry> &feasible, // the list of feasible edges in f with respect to e
127  bool heuristic);
128 
130  bool isConstraintFeasible(UpwardPlanRep &UPR,
131  const List<edge> &orig_edges,
132  edge e_orig,
133  adjEntry adjCurrent,
134  adjEntry adjNext, // the next adjEntry of the current insertion path
135  EdgeArray<adjEntry> &predAdj //Array to reconstruction the insertion path
136  );
137 
138 
140  bool isConstraintFeasible(UpwardPlanRep &UPR,
141  List<edge> &origEdges,
142  edge e_orig,
143  SList<adjEntry> &path);
144 
145 
146 };
147 
148 } // end namespace ogdf
static bool isUpwardPlanar_singleSource(const Graph &G)
Tests whether the single-source digraph G is upward planar.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of class UpwardPlanarity, which implements different types of algorithms testing upward p...
void minFIP(UpwardPlanRep &UPR, List< edge > &origEdges, EdgeArray< int > &cost, edge e_orig, SList< adjEntry > &path)
compute the minimal feasible insertion path
Upward planarized representations (of a connected component) of a graph.
Definition: UpwardPlanRep.h:51
Declaration of CombinatorialEmbedding and face.
ReturnType
The return type of a module.
Definition: Module.h:51
Singly linked lists (maintaining the length of the list).
Definition: SList.h:777
Declaration of interface for edge insertion algorithms.
Edge insertion module that inserts each edge optimally into a fixed embedding.
Faces in a combinatorial embedding.
Class for the representation of edges.
Definition: Graph_d.h:291
Class for the representation of nodes.
Definition: Graph_d.h:167
void constraintFIP(UpwardPlanRep &UPR, List< edge > &origEdges, EdgeArray< int > &cost, edge e_orig, SList< adjEntry > &path)
compute a constraint feasible insertion path usig heuristic.
FixedEmbeddingUpwardEdgeInserter()
Creates an instance of fixed-embedding edge inserter.
The namespace for all OGDF objects.
Class for adjacency list elements.
Definition: Graph_d.h:78