Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

SeparatorLiptonTarjan.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 
39 
47  friend class Cycle;
48 
49 public:
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 
62 protected:
63  bool useTriBFS;
64  unsigned int treeHeightIterations;
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 
95  void fillLists(List<node>& separator, List<node>& first, List<node>& second) const;
96 
102  edge chooseEdge() const;
103 };
104 
105 
106 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::SeparatorLiptonTarjan::useTriBFS
bool useTriBFS
Definition: SeparatorLiptonTarjan.h:63
ogdf::SeparatorLiptonTarjan
Computes planar separators according to Lipton and Tarjan 1979.
Definition: SeparatorLiptonTarjan.h:46
ogdf::matching_blossom::Cycle
Definition: Cycle.h:43
ogdf::PlanarSeparatorModule
Abstract description of all planar separator algorithms.
Definition: PlanarSeparatorModule.h:916
ogdf::SeparatorLiptonTarjan::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: SeparatorLiptonTarjan.h:59
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: List.h:42
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::SeparatorLiptonTarjan::treeHeightIterations
unsigned int treeHeightIterations
Definition: SeparatorLiptonTarjan.h:64
ogdf::SeparatorLiptonTarjan::tree
std::shared_ptr< BFSTreeClassical > tree
Definition: SeparatorLiptonTarjan.h:69
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::SeparatorLiptonTarjan::SeparatorLiptonTarjan
SeparatorLiptonTarjan(bool useTriangulatingBFS=false, unsigned int treeHeightIt=0)
Constructor.
Definition: SeparatorLiptonTarjan.h:56
ogdf::sync_plan::internal::to_string
std::string to_string(const std::function< std::ostream &(std::ostream &)> &func)
ogdf::SeparatorLiptonTarjan::getSpecificName
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
Definition: SeparatorLiptonTarjan.h:71
PlanarSeparatorModule.h
Declaration of base class of all planar separator algorithms.