Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
SeparatorLiptonTarjanFC.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
37
38#include <memory>
39#include <string>
40
41namespace ogdf {
42class GraphCopy;
43template<class E>
44class List;
45template<class E>
46class SListPure;
47
48namespace planar_separators {
49
54public:
61 BFSTreeFC(GraphCopy& G, node rootNode) : ArrayBFSTree(G, rootNode) { construct(); }
62
63 void construct();
64};
65
71public:
78 TriangulatingBFSTree(GraphCopy& G, node rootNode) : ArrayBFSTree(G, rootNode) { construct(); }
79
80 void construct();
81
82 void visit(node v, node parent, adjEntry adj, SListPure<node>& bfs);
83};
84
85}
86
88
95public:
101 SeparatorLiptonTarjanFC(bool useTriBFS = false) : useTriangulatingBFS {useTriBFS} { }
102
103 virtual double getMaxSeparatorSize(int n) const override { return -1; }
104
105protected:
106 virtual bool doSeparate(const Graph& G, List<node>& separator, List<node>& first,
107 List<node>& second) override;
108
110 std::shared_ptr<ArrayBFSTree> tree;
111
112 virtual std::string getSpecificName() const override {
113 std::string name = "LTFC";
114 if (useTriangulatingBFS) {
115 name += "-triBFS";
116 }
117 return name;
118 }
119
128 virtual bool findCycle(List<node>& separator, List<node>& first, List<node>& second);
129
136};
137
138}
Includes declaration of graph class.
Declaration of base class of all planar separator algorithms.
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Class for the representation of edges.
Definition Graph_d.h:364
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:390
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Class for the representation of nodes.
Definition Graph_d.h:241
Abstract description of all planar separator algorithms.
Singly linked lists.
Definition SList.h:191
Computes planar separators using Fundamental Cycles.
virtual double getMaxSeparatorSize(int n) const override
Provides the maximal separator size that this algorithm guarantees as a function of the number of nod...
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
edge chooseEdge() const
Randomly selects the initial edge for the first cycle.
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.
std::shared_ptr< ArrayBFSTree > tree
SeparatorLiptonTarjanFC(bool useTriBFS=false)
Constructor.
virtual bool findCycle(List< node > &separator, List< node > &first, List< node > &second)
Finds a cycle that works as a separator.
Abstract BFSTree that is realized via NodeArrays.
BFSTreeFC(GraphCopy &G, node rootNode)
Constructor.
Triangulating BFS tree that operates on a non-triangulated graph and constructs the triangulation tog...
void visit(node v, node parent, adjEntry adj, SListPure< node > &bfs)
TriangulatingBFSTree(GraphCopy &G, node rootNode)
Constructor.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.