Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FUPSSimple.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/upward/FUPSModule.h>
35 
36 namespace ogdf {
37 
38 
40 public:
42  FUPSSimple() : m_nRuns(0) { }
43 
44  // destructor
46 
47  // options
48 
50  void runs(int nRuns) { m_nRuns = nRuns; }
51 
53  int runs() const { return m_nRuns; }
54 
57  adjEntry adjFound = nullptr;
58  for (adjEntry adj : v->adjEntries) {
59  if (Gamma.rightFace(adj) == f) {
60  adjFound = adj;
61  break;
62  }
63  }
64 
65  OGDF_ASSERT(Gamma.rightFace(adjFound) == f);
66 
67  return adjFound;
68  }
69 
70 protected:
80  virtual Module::ReturnType doCall(UpwardPlanRep& UPR, List<edge>& delEdges) override;
81 
82 
83 private:
84  int m_nRuns;
85 
86  void computeFUPS(UpwardPlanRep& UPR, List<edge>& delEdges);
87 
89  /*
90  * @param GC The Copy of the input graph G.
91  * @param &delEdges The deleted edges (edges of G).
92  * @param random compute a random span tree
93  * @multisource true, if the original graph got multisources. In this case, the incident edges of
94  * the source are allways included in the span tree
95  */
96  void getSpanTree(GraphCopy& GC, List<edge>& delEdges, bool random);
97 
98  /*
99  * Function use by geSpannTree to compute the spannig tree.
100  */
101  void dfs_visit(const Graph& G, edge e, NodeArray<bool>& visited, EdgeArray<bool>& treeEdges,
102  bool random);
103 
104  // construct a merge graph with repsect to gamma and its test acyclicity
111  bool constructMergeGraph(GraphCopy& M, adjEntry adj_orig, const List<edge>& del_orig);
112 };
113 
114 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::FUPSSimple::m_nRuns
int m_nRuns
The number of runs for randomization.
Definition: FUPSSimple.h:84
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:54
ogdf::ConstCombinatorialEmbedding::rightFace
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
Definition: CombinatorialEmbedding.h:270
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:384
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::FUPSSimple::getAdjEntry
adjEntry getAdjEntry(const CombinatorialEmbedding &Gamma, node v, face f)
return a adjEntry of node v which right face is f. Be Carefully! The adjEntry is not always unique.
Definition: FUPSSimple.h:56
ogdf::FUPSSimple::~FUPSSimple
~FUPSSimple()
Definition: FUPSSimple.h:45
ogdf::FUPSSimple
Definition: FUPSSimple.h:39
ogdf::NodeElement::adjEntries
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Definition: Graph_d.h:264
ogdf::List< edge >
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::FUPSSimple::FUPSSimple
FUPSSimple()
Creates an instance of feasible subgraph algorithm.
Definition: FUPSSimple.h:42
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
FUPSModule.h
Declaration of Feasible Upward Planar Subgraph (FUPS) Module, an interface for subgraph computation.
ogdf::CombinatorialEmbedding
Combinatorial embeddings of planar graphs with modification functionality.
Definition: CombinatorialEmbedding.h:397
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::FUPSModule
Interface for feasible upward planar subgraph algorithms.
Definition: FUPSModule.h:43
ogdf::FUPSSimple::runs
int runs() const
Returns the current number of randomized runs.
Definition: FUPSSimple.h:53
ogdf::FUPSSimple::runs
void runs(int nRuns)
Sets the number of randomized runs to nRuns.
Definition: FUPSSimple.h:50
ogdf::UpwardPlanRep
Upward planarized representations (of a connected component) of a graph.
Definition: UpwardPlanRep.h:50
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:50
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