Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SeparatorDual.h
Go to the documentation of this file.
1
32#pragma once
33
39
40#include <unordered_set>
41
42namespace ogdf {
43
45
52public:
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
76protected:
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}
declaration and implementation of FaceArray class
Declaration of base class of all planar separator algorithms.
Declaration of class SeparatorDualHelper.
Declaration of class SeparatorLiptonTarjan.
Declaration of class SeparatorLiptonTarjanFC.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Computes planar separators using the Dual of the graph.
virtual double getMaxSeparatorSize(int n) const override
Provides the maximal separator size that this algorithm guarantees as a function of the number of nod...
SeparatorDual(bool useTriangulatingBFS=false, unsigned int treeHeightIt=0)
Constructor.
virtual void makeTree() override
Creates the BFS tree used by the algorithm.
unsigned int treeHeightIterations
virtual bool doSeparate(const Graph &G, List< node > &separator, List< node > &first, List< node > &second) override
Core of the specific separation algorithm - override this in inheriting classes.
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
Computes planar separators according to Lipton and Tarjan 1979.
#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.