Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FixedEmbeddingUpwardEdgeInserter.h
Go to the documentation of this file.
1 
32 #pragma once
33 
37 
38 namespace ogdf {
39 
42 public:
45 
47 
48 
49 private:
51 
61  virtual ReturnType doCall(UpwardPlanRep& UPR, const List<edge>& origEdges,
62  const EdgeArray<int>* costOrig = nullptr,
63  const EdgeArray<bool>* forbiddenEdgeOrig = nullptr) override;
64 
65 
66  ReturnType insertAll(UpwardPlanRep& UPR, List<edge>& toInsert, EdgeArray<int>& cost);
67 
68 
70  void staticLock(UpwardPlanRep& UPR, EdgeArray<bool>& locked, const List<edge>& origEdges,
71  edge e_orig);
72 
74  void dynamicLock(UpwardPlanRep& UPR, EdgeArray<bool>& locked, face f, adjEntry e_cur);
75 
76  void nextFeasibleEdges(UpwardPlanRep& UPR, List<adjEntry>& nextEdges, face f, adjEntry e_cur,
77  EdgeArray<bool>& locked, bool heuristic);
78 
80  void minFIP(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
81  SList<adjEntry>& path) {
82  getPath(UPR, origEdges, cost, e_orig, path, false);
83  }
84 
86  void constraintFIP(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
87  SList<adjEntry>& path) {
88  getPath(UPR, origEdges, cost, e_orig, path, true);
89  }
90 
92  void getPath(UpwardPlanRep& UPR, List<edge>& origEdges, EdgeArray<int>& cost, edge e_orig,
93  SList<adjEntry>& path, bool heuristic);
94 
95 
97  void markUp(const Graph& G, node v, EdgeArray<bool>& markedEdges);
98 
99 
101  void markDown(const Graph& G, node v, EdgeArray<bool>& markedEdges);
102 
104  void feasibleEdges(UpwardPlanRep& UPR,
105  face f, // current face
106  adjEntry adj, // current adjEntry, right face muss be f
107  EdgeArray<bool>& locked, // we compute the dyn. locked edges on the fly with respect to e
108  List<adjEntry>& feasible, // the list of feasible edges in f with respect to e
109  bool heuristic);
110 
112  bool isConstraintFeasible(UpwardPlanRep& UPR, const List<edge>& orig_edges, edge e_orig,
113  adjEntry adjCurrent,
114  adjEntry adjNext, // the next adjEntry of the current insertion path
115  EdgeArray<adjEntry>& predAdj //Array to reconstruction the insertion path
116  );
117 
118 
120  bool isConstraintFeasible(UpwardPlanRep& UPR, List<edge>& origEdges, edge e_orig,
121  SList<adjEntry>& path);
122 };
123 
124 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::UpwardPlanarity::isUpwardPlanar_singleSource
static bool isUpwardPlanar_singleSource(const Graph &G)
Tests whether the single-source digraph G is upward planar.
UpwardEdgeInserterModule.h
Declaration of interface for edge insertion algorithms.
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:833
ogdf::FixedEmbeddingUpwardEdgeInserter
Edge insertion module that inserts each edge optimally into a fixed embedding.
Definition: FixedEmbeddingUpwardEdgeInserter.h:41
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::FixedEmbeddingUpwardEdgeInserter::FixedEmbeddingUpwardEdgeInserter
FixedEmbeddingUpwardEdgeInserter()
Creates an instance of fixed-embedding edge inserter.
Definition: FixedEmbeddingUpwardEdgeInserter.h:44
ogdf::UpwardEdgeInserterModule
Definition: UpwardEdgeInserterModule.h:39
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:862
ogdf::FixedEmbeddingUpwardEdgeInserter::~FixedEmbeddingUpwardEdgeInserter
~FixedEmbeddingUpwardEdgeInserter()
Definition: FixedEmbeddingUpwardEdgeInserter.h:46
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:356
ogdf::FixedEmbeddingUpwardEdgeInserter::isUpwardPlanar
bool isUpwardPlanar(Graph &G) const
Definition: FixedEmbeddingUpwardEdgeInserter.h:50
ogdf::UpwardPlanRep
Upward planarized representations (of a connected component) of a graph.
Definition: UpwardPlanRep.h:50
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:80
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:86
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::FaceElement
Faces in a combinatorial embedding.
Definition: CombinatorialEmbedding.h:109