39namespace planar_separators {
78using namespace planar_separators;
122 std::shared_ptr<BFSTreeHP>
tree;
245 const Ring& outer)
const;
282namespace planar_separators {
327 nodes.pushBack(startNode);
342 nextEntry =
separator.ringOut[startNode].front();
347 while (next != startNode) {
348 nodes.pushBack(next);
352 if (
separator.ringOut[next].size() > 1) {
359 }
else if (
separator.ringOut[next].size() == 1) {
360 nextEntry =
separator.ringOut[next].front();
Includes declaration of dual graph class.
Declaration of base class of all planar separator algorithms.
Class for adjacency list elements.
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
adjEntry cyclicSucc() const
Returns the cyclic successor in the adjacency list.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
The parameterized class Array implements dynamic arrays of type E.
Combinatorial embeddings of planar graphs.
Dynamic arrays indexed with edges.
Class for the representation of edges.
Dynamic arrays indexed with faces of a combinatorial embedding.
Copies of graphs supporting edge splitting.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
iterator pushBack(const E &x)
Adds element x at the end of the list.
const_iterator cbegin() const
Returns a const iterator to the first element of the list.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Abstract description of all planar separator algorithms.
Computes planar separators according to Har-Peled.
std::shared_ptr< BFSTreeHP > tree
A special tree that can be reconstructed, see above.
virtual void reset() override
Resets all fields, clears lists and re-initializes arrays to enable reuse of the module.
edge findSeparatorEdge() const
Finds a non-tree edge that, together with the tree, forms a (possibly too large) 2/3-separator.
virtual bool doSeparate(const Graph &G, List< node > &separator, List< node > &first, List< node > &second) override
Entry point for the core of the algorithm.
NodeArray< List< adjEntry > > ringIn
hold for every node the segment of the border between levels i-1 and i that runs through this node (t...
List< List< face > > faceFrontiers
virtual void makeTree()
Constructs the BFSTreeHP from a random node.
void findFaceLevels(const node root)
Performs a BFS over the faces of the embedding (more or less) to assign a level to each face and find...
void walkAlongRing(const Ring &ring, bool firstSection, bool invert, EdgeArray< bool > ®ionBorder, List< node > ®ion) const
Used in region construction: Walks along a Ring and stores nodes and edges of the section.
virtual std::string getSpecificName() const override
Returns the unique name of the core algorithm, to be combined with postprocessors later.
void buildRings(const Cycle &cycle)
Constructs the array of concentric rings of nodes formed by the (potentially partial) borders of the ...
SeparatorHarPeled()
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...
NodeArray< List< adjEntry > > ringOut
bool constructK(List< node > ®ion, const Cycle &cycle, const Ring &inner, const Ring &outer) const
Builds the region K.
void createDual(Graph &Dual, EdgeArray< edge > &oldEdge) const
Creates the dual of the graph to help find a separator edge.
FaceArray< int > faceLevels
bool findRegions(List< node > ®ion, const Cycle &cycle, const Ring &inner, int outerIdx) const
Finds the regions R1 and R2 formed by the separator cycle and an inner and outer ring.
int find_i0(int delta) const
Finds i0, the first step of the first "ladder" of rings that is not larger than n / delta nodes.
bool finalize(std::string exit, const List< node > ®ion, List< node > &separator, List< node > &first, List< node > &second)
Takes a list of nodes of the GraphCopy and removes their counterparts from the original graph,...
NodeArray< bool > isMultiNode
bool findRegion(List< node > ®ion, const Cycle &cycle, const Ring &inner, const Ring &outer, bool inside) const
Builds the region R1 or R2.
void walkAlongSeparator(node startNode, node endNode, EdgeArray< bool > ®ionBorder, List< node > ®ion) const
Used in region construction: Walks along the 2/3-separator from startNode to endNode.
bool testRegionSize(node startNode, const EdgeArray< bool > ®ionBorder, bool inside, int regionSize) const
Checks whether the inside [outside] of the region defined by regionBorder is greater or smaller than ...
NodeArray< adjEntry > mainSeparator
ConstCombinatorialEmbedding E
Abstract BFSTree that is realized via NodeArrays.
Specialised tree representation for Har-Peled.
void construct()
Builds the tree by performing BFS search.
void reconstruct(const Cycle &cycle)
Reconstructs the tree, rooting it at root of cycle.
BFSTreeHP(GraphCopy &G, node rootNode)
Constructor.
void calculateDescendants()
Calculates the number of children of each node in the tree.
Auxiliary data structure to represent Cycles in planar graphs.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
Ring(node startNode, node endNode, adjEntry outPointer, const SeparatorHarPeled &separator)
Constructor for a full ring.
Ring(node n)
Constructor for degenerate rings.
List< adjEntry > getSectionInSeparator(bool firstSection) const
Returns a section of this ring, either the first one from in to out, or the second one from out to in...
node in
Crossing points with the main separator S: in is where S enters, out is where S leaves.
List< node > nodes
Nodes and adjEntries that form the border of the ring.
bool isDegenerate
A degenerate ring contains only one node.