Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SeparatorLiptonTarjan.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37
39
47 friend class Cycle;
48
49public:
56 SeparatorLiptonTarjan(bool useTriangulatingBFS = false, unsigned int treeHeightIt = 0)
57 : useTriBFS {useTriangulatingBFS}, treeHeightIterations(treeHeightIt + 1) { }
58
59 virtual double getMaxSeparatorSize(int n) const override { return sqrt(8) * sqrt(n); }
60
61
62protected:
65
66 virtual bool doSeparate(const Graph& G, List<node>& separator, List<node>& first,
67 List<node>& second) override;
68
69 std::shared_ptr<BFSTreeClassical> tree;
70
71 virtual std::string getSpecificName() const override {
72 std::string name = "LT";
73 if (useTriBFS) {
74 name += "-triBFS";
75 }
76 if (treeHeightIterations > 1) {
77 name += "-THM-" + std::to_string(treeHeightIterations - 1);
78 }
79
80 return name;
81 }
82
86 virtual void makeTree();
87
96
103};
104
105
106}
Declaration of base class of all planar separator algorithms.
Class for the representation of edges.
Definition Graph_d.h:300
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
Abstract description of all planar separator algorithms.
Computes planar separators according to Lipton and Tarjan 1979.
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.
void fillLists(List< node > &separator, List< node > &first, List< node > &second) const
Fills the lists with the cycle / inside / outside once the cycle is ready.
std::shared_ptr< BFSTreeClassical > tree
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
virtual void makeTree()
Creates the BFS tree used by the algorithm.
SeparatorLiptonTarjan(bool useTriangulatingBFS=false, unsigned int treeHeightIt=0)
Constructor.
virtual double getMaxSeparatorSize(int n) const override
Provides the maximal separator size that this algorithm guarantees as a function of the number of nod...
edge chooseEdge() const
Chooses the initial edge for the very first cycle.
Auxiliary data structure to represent Cycles in planar graphs.
#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.