Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FixedEmbeddingUpwardEdgeInserter.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/basic.h>
39 
40 namespace ogdf {
41 class UpwardPlanRep;
42 template<class E>
43 class List;
44 template<class E>
45 class SList;
46 
49 public:
52 
54 
55 
56 private:
58 
68  virtual ReturnType doCall(UpwardPlanRep& UPR, const List<edge>& origEdges,
69  const EdgeArray<int>* costOrig = nullptr,
70  const EdgeArray<bool>* forbiddenEdgeOrig = nullptr) override;
71 
72 
73  ReturnType insertAll(UpwardPlanRep& UPR, List<edge>& toInsert, EdgeArray<int>& cost);
74 
75 
77  void staticLock(UpwardPlanRep& UPR, EdgeArray<bool>& locked, const List<edge>& origEdges,
78  edge e_orig);
79 
81  void dynamicLock(UpwardPlanRep& UPR, EdgeArray<bool>& locked, face f, adjEntry e_cur);
82 
83  void nextFeasibleEdges(UpwardPlanRep& UPR, List<adjEntry>& nextEdges, face f, adjEntry e_cur,
84  EdgeArray<bool>& locked, bool heuristic);
85 
87  void minFIP(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
88  SList<adjEntry>& path) {
89  getPath(UPR, origEdges, cost, e_orig, path, false);
90  }
91 
93  void constraintFIP(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
94  SList<adjEntry>& path) {
95  getPath(UPR, origEdges, cost, e_orig, path, true);
96  }
97 
99  void getPath(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
100  SList<adjEntry>& path, bool heuristic);
101 
102 
104  void markUp(const Graph& G, node v, EdgeArray<bool>& markedEdges);
105 
106 
108  void markDown(const Graph& G, node v, EdgeArray<bool>& markedEdges);
109 
111  void feasibleEdges(UpwardPlanRep& UPR,
112  face f, // current face
113  adjEntry adj, // current adjEntry, right face muss be f
114  EdgeArray<bool>& locked, // we compute the dyn. locked edges on the fly with respect to e
115  List<adjEntry>& feasible, // the list of feasible edges in f with respect to e
116  bool heuristic);
117 
119  bool isConstraintFeasible(UpwardPlanRep& UPR, const List<edge>& orig_edges, edge e_orig,
120  adjEntry adjCurrent,
121  adjEntry adjNext, // the next adjEntry of the current insertion path
122  EdgeArray<adjEntry>& predAdj //Array to reconstruction the insertion path
123  );
124 
125 
127  bool isConstraintFeasible(UpwardPlanRep& UPR, List<edge>& origEdges, edge e_orig,
128  SList<adjEntry>& path);
129 };
130 
131 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::UpwardPlanarity::isUpwardPlanar_singleSource
static bool isUpwardPlanar_singleSource(const Graph &G)
Tests whether the single-source digraph G is upward planar.
Graph.h
Includes declaration of graph class.
UpwardEdgeInserterModule.h
Declaration of interface for edge insertion algorithms.
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::FixedEmbeddingUpwardEdgeInserter
Edge insertion module that inserts each edge optimally into a fixed embedding.
Definition: FixedEmbeddingUpwardEdgeInserter.h:48
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::FixedEmbeddingUpwardEdgeInserter::FixedEmbeddingUpwardEdgeInserter
FixedEmbeddingUpwardEdgeInserter()
Creates an instance of fixed-embedding edge inserter.
Definition: FixedEmbeddingUpwardEdgeInserter.h:51
ogdf::UpwardEdgeInserterModule
Definition: UpwardEdgeInserterModule.h:44
UpwardPlanarity.h
Declaration of class UpwardPlanarity, which implements different types of algorithms testing upward p...
ogdf::List< edge >
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::FixedEmbeddingUpwardEdgeInserter::~FixedEmbeddingUpwardEdgeInserter
~FixedEmbeddingUpwardEdgeInserter()
Definition: FixedEmbeddingUpwardEdgeInserter.h:53
basic.h
Basic declarations, included by all source files.
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::FixedEmbeddingUpwardEdgeInserter::isUpwardPlanar
bool isUpwardPlanar(Graph &G) const
Definition: FixedEmbeddingUpwardEdgeInserter.h:57
ogdf::UpwardPlanRep
Upward planarized representations (of a connected component) of a graph.
Definition: UpwardPlanRep.h:57
ogdf::FixedEmbeddingUpwardEdgeInserter::minFIP
void minFIP(UpwardPlanRep &UPR, List< edge > &origEdges, EdgeArray< int > &cost, edge e_orig, SList< adjEntry > &path)
compute the minimal feasible insertion path
Definition: FixedEmbeddingUpwardEdgeInserter.h:87
ogdf::FixedEmbeddingUpwardEdgeInserter::constraintFIP
void constraintFIP(UpwardPlanRep &UPR, List< edge > &origEdges, EdgeArray< int > &cost, edge e_orig, SList< adjEntry > &path)
compute a constraint feasible insertion path usig heuristic.
Definition: FixedEmbeddingUpwardEdgeInserter.h:93
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::FaceElement
Faces in a combinatorial embedding.
Definition: CombinatorialEmbedding.h:118