Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

FUPSSimple.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/GraphList.h>
37 #include <ogdf/basic/Module.h>
38 #include <ogdf/basic/basic.h>
39 #include <ogdf/upward/FUPSModule.h>
40 
41 namespace ogdf {
42 class GraphCopy;
43 class UpwardPlanRep;
44 template<class E>
45 class List;
46 
48 public:
50  FUPSSimple() : m_nRuns(0) { }
51 
52  // destructor
54 
55  // options
56 
58  void runs(int nRuns) { m_nRuns = nRuns; }
59 
61  int runs() const { return m_nRuns; }
62 
65  adjEntry adjFound = nullptr;
66  for (adjEntry adj : v->adjEntries) {
67  if (Gamma.rightFace(adj) == f) {
68  adjFound = adj;
69  break;
70  }
71  }
72 
73  OGDF_ASSERT(Gamma.rightFace(adjFound) == f);
74 
75  return adjFound;
76  }
77 
78 protected:
88  virtual Module::ReturnType doCall(UpwardPlanRep& UPR, List<edge>& delEdges) override;
89 
90 
91 private:
92  int m_nRuns;
93 
94  void computeFUPS(UpwardPlanRep& UPR, List<edge>& delEdges);
95 
97  /*
98  * @param GC The Copy of the input graph G.
99  * @param &delEdges The deleted edges (edges of G).
100  * @param random compute a random span tree
101  * @multisource true, if the original graph got multisources. In this case, the incident edges of
102  * the source are allways included in the span tree
103  */
104  void getSpanTree(GraphCopy& GC, List<edge>& delEdges, bool random);
105 
106  /*
107  * Function use by geSpannTree to compute the spannig tree.
108  */
109  void dfs_visit(const Graph& G, edge e, NodeArray<bool>& visited, EdgeArray<bool>& treeEdges,
110  bool random);
111 
112  // construct a merge graph with repsect to gamma and its test acyclicity
119  bool constructMergeGraph(GraphCopy& M, adjEntry adj_orig, const List<edge>& del_orig);
120 };
121 
122 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::FUPSSimple::m_nRuns
int m_nRuns
The number of runs for randomization.
Definition: FUPSSimple.h:92
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:66
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:279
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
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:64
ogdf::FUPSSimple::~FUPSSimple
~FUPSSimple()
Definition: FUPSSimple.h:53
GraphList.h
Decralation of GraphElement and GraphList classes.
ogdf::FUPSSimple
Definition: FUPSSimple.h:47
ogdf::NodeElement::adjEntries
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Definition: Graph_d.h:271
ogdf::List< edge >
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::FUPSSimple::FUPSSimple
FUPSSimple()
Creates an instance of feasible subgraph algorithm.
Definition: FUPSSimple.h:50
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
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:406
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::FUPSModule
Interface for feasible upward planar subgraph algorithms.
Definition: FUPSModule.h:48
ogdf::FUPSSimple::runs
int runs() const
Returns the current number of randomized runs.
Definition: FUPSSimple.h:61
ogdf::FUPSSimple::runs
void runs(int nRuns)
Sets the number of randomized runs to nRuns.
Definition: FUPSSimple.h:58
ogdf::UpwardPlanRep
Upward planarized representations (of a connected component) of a graph.
Definition: UpwardPlanRep.h:57
Module.h
Declares base class for all module types.
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:52
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