Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

SeparatorDual.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/FaceArray.h>
39 
40 #include <unordered_set>
41 
42 namespace ogdf {
43 
45 
52 public:
59  SeparatorDual(bool useTriangulatingBFS = false, unsigned int treeHeightIt = 0)
60  : useTriBFS {useTriangulatingBFS}, treeHeightIterations(treeHeightIt + 1) { }
61 
62  virtual std::string getSpecificName() const override {
63  std::string name = "Dual";
64  if (useTriBFS) {
65  name += "-triBFS";
66  }
67  if (treeHeightIterations > 1) {
68  name += "-THM-" + std::to_string(treeHeightIterations - 1);
69  }
70 
71  return name;
72  }
73 
74  virtual double getMaxSeparatorSize(int n) const override { return 4 * sqrt(n); }
75 
76 protected:
77  virtual void makeTree() override;
78 
79  virtual bool doSeparate(const Graph& G, List<node>& separator, List<node>& first,
80  List<node>& second) override;
81 
82  bool useTriBFS; // whether to use triangulating BFS for the second phase or not
83  unsigned int treeHeightIterations; // how many iterations of tree height maximisation to run
84 };
85 
86 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::SeparatorLiptonTarjan
Computes planar separators according to Lipton and Tarjan 1979.
Definition: SeparatorLiptonTarjan.h:46
FaceArray.h
declaration and implementation of FaceArray class
SeparatorDualHelper.h
Declaration of class SeparatorDualHelper.
ogdf::SeparatorDual::getSpecificName
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
Definition: SeparatorDual.h:62
ogdf::SeparatorDual::getMaxSeparatorSize
virtual double getMaxSeparatorSize(int n) const override
Provides the maximal separator size that this algorithm guarantees as a function of the number of nod...
Definition: SeparatorDual.h:74
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
ogdf::SeparatorDual
Computes planar separators using the Dual of the graph.
Definition: SeparatorDual.h:51
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
SeparatorLiptonTarjan.h
Declaration of class SeparatorLiptonTarjan.
ogdf::SeparatorDual::useTriBFS
bool useTriBFS
Definition: SeparatorDual.h:82
SeparatorLiptonTarjanFC.h
Declaration of class SeparatorLiptonTarjanFC.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::SeparatorDual::treeHeightIterations
unsigned int treeHeightIterations
Definition: SeparatorDual.h:83
ogdf::SeparatorDual::SeparatorDual
SeparatorDual(bool useTriangulatingBFS=false, unsigned int treeHeightIt=0)
Constructor.
Definition: SeparatorDual.h:59
ogdf::sync_plan::internal::to_string
std::string to_string(const std::function< std::ostream &(std::ostream &)> &func)
PlanarSeparatorModule.h
Declaration of base class of all planar separator algorithms.