Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SubgraphUpwardPlanarizer.h
Go to the documentation of this file.
1
32#pragma once
33
43
44#include <memory>
45
46namespace ogdf {
47
68public:
71 m_runs = 1;
72 //set default module
73 m_subgraph.reset(new FUPSSimple());
74 m_inserter.reset(new FixedEmbeddingUpwardEdgeInserter());
75 m_acyclicMod.reset(new GreedyCycleRemoval());
76 }
77
79 void setSubgraph(FUPSModule* FUPS) { m_subgraph.reset(FUPS); }
80
83
88
89 int runs() { return m_runs; }
90
91 void runs(int n) { m_runs = n; }
92
93protected:
95 const EdgeArray<bool>& forbid) override;
96
97 std::unique_ptr<FUPSModule> m_subgraph;
98 std::unique_ptr<UpwardEdgeInserterModule> m_inserter;
99 std::unique_ptr<AcyclicSubgraphModule> m_acyclicMod;
101
102private:
104
109
110
112 void merge(const GraphCopy& GC, UpwardPlanRep& UPR_res, const GraphCopy& block,
114};
115
116}
Declaration of interface for acyclic subgraph algorithms.
Declaration of class BCTree.
Declaration of Feasible Upward Planar Subgraph (FUPS) Module, an interface for subgraph computation.
Declaration of the FUPSSimple.
declaration of class FixedEmbeddingInserterOld
Declaration of class GeedyCycleRemoval.
Declaration of interface for edge insertion algorithms.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of UpwardPlanarizer Module, an interface for upward planarization algorithms.
Base class of algorithms for computing a maximal acyclic subgraph.
Static BC-trees.
Definition BCTree.h:55
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Interface for feasible upward planar subgraph algorithms.
Definition FUPSModule.h:43
Edge insertion module that inserts each edge optimally into a fixed embedding.
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:254
Greedy algorithm for computing a maximal acyclic subgraph.
ReturnType
The return type of a module.
Definition Module.h:50
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Takes an acyclic connected non-upward-planar graph and planarizes it, i.e., we obtain an upward-plana...
void setInserter(UpwardEdgeInserterModule *pInserter)
Sets the module option for the edge insertion module.
SubgraphUpwardPlanarizer()
Creates an instance of subgraph planarizer.
std::unique_ptr< FUPSModule > m_subgraph
The upward planar subgraph algorithm.
std::unique_ptr< UpwardEdgeInserterModule > m_inserter
The edge insertion module.
void setSubgraph(FUPSModule *FUPS)
Sets the module option for the computation of the feasible upward planar subgraph.
std::unique_ptr< AcyclicSubgraphModule > m_acyclicMod
The acyclic subgraph module.
void dfsMerge(const GraphCopy &GC, BCTree &BC, NodeArray< GraphCopy > &biComps, NodeArray< UpwardPlanRep > &uprs, UpwardPlanRep &UPR_res, node parent_BC, node current_BC, NodeArray< bool > &nodesDone)
traversion the BTree and merge the component to a common graph
void merge(const GraphCopy &GC, UpwardPlanRep &UPR_res, const GraphCopy &block, UpwardPlanRep &UPR)
add UPR to UPR_res.
void setAcyclicSubgraphModule(AcyclicSubgraphModule *acyclicMod)
Sets the module option for acyclic subgraph module.
void constructComponentGraphs(BCTree &BC, NodeArray< GraphCopy > &biComps)
virtual ReturnType doCall(UpwardPlanRep &UPR, const EdgeArray< int > &cost, const EdgeArray< bool > &forbid) override
Computes an upward planarized representation of the input graph.
Upward planarized representations (of a connected component) of a graph.
Interface for upward planarization algorithms.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.