37#include <unordered_set>
41namespace planar_separator {
144 for (
auto it = first.
cycle.cbegin(); *it != x; ++it) {
148 auto it =
second.cycle.cbegin();
152 for (; it !=
second.cycle.cend(); ++it) {
165 if (isInCycle(adj->
theNode())) {
199 bool checkSize(
int n)
const {
return inside + cycle.
size() > 1.0 / 3.0 * n; }
declaration and implementation of FaceArray class
Declaration of base class of all planar separator algorithms.
Class for adjacency list elements.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
node theNode() const
Returns the node whose adjacency list contains this element.
adjEntry faceCycleSucc() const
Returns the cyclic successor in face.
Combinatorial embeddings of planar graphs with modification functionality.
Dynamic arrays indexed with faces of a combinatorial embedding.
Faces in a combinatorial embedding.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
int size() const
Returns the number of elements in the list.
iterator pushBack(const E &x)
Adds element x at the end of the list.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
E popBackRet()
Removes the last element from the list and returns it.
E popFrontRet()
Removes the first element from the list and returns it.
const_reference front() const
Returns a const reference to the first element.
const_reference back() const
Returns a const reference to the last element.
Class for the representation of nodes.
Helper class for SeparatorDual and SeparatorDualFC.
std::shared_ptr< BFSTree > tree
CycleData process(face f, adjEntry adj)
Processes a face: One step of the recursion in the DFS.
List< std::pair< face, adjEntry > > getUnmarkedNeighbours(face f, adjEntry adj)
Finds all unmarked neighbours of a face.
std::shared_ptr< GraphCopy > graph
CycleData dfs()
Recursive Depth First Search over the faces of the dual of the graph.
SeparatorDualHelper(std::shared_ptr< GraphCopy > pGraph, std::shared_ptr< BFSTree > pTree)
CombinatorialEmbedding embedding
#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.
@ tree
for every hyperedge e a minimal subcubic tree connecting all hypernodes incident with e together is a...
Auxiliary lightweight data structure to represent cycles.
CycleData(const Graph &G, CycleData &first, CycleData &second)
Constructor.
CycleData()
Empty Constructor - only used to be able to throw empty CD in case of algorithm failure.
bool checkSize(int n) const
Checks the size of this cycle.
void removeTriangle(adjEntry adj)
Expands the cycle by removing a triangle.
bool isInCycle(node n)
Checks if a node lies on the cycle.
std::unordered_set< node > nodes
CycleData(const Graph &G, const face f, const adjEntry adj)
Constructor.
void addTriangle(adjEntry adj)
Expands the cycle by adding a triangle.
List< node > cycle
contains nodes on the cycle, starting with v, ending with u, where e = (u,v) is the initial edge