|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
40 #include <unordered_set>
50 namespace planar_separators {
59 : graph {pGraph},
tree {pTree} { }
119 pushBack(adj->twinNode());
120 pushBack(adj->faceCycleSucc()->twinNode());
121 pushBack(adj->theNode());
136 auto firstIt = first.
cycle.crbegin();
137 auto secondIt = second.
cycle.cbegin();
141 while (firstIt != first.
cycle.crend() && secondIt != second.
cycle.cend()
142 && *firstIt == *secondIt) {
147 node x = path.back();
153 for (
auto it = first.
cycle.cbegin(); *it != x; ++it) {
157 auto it = second.
cycle.cbegin();
161 for (; it != second.
cycle.cend(); ++it) {
174 if (isInCycle(adj->
theNode())) {
191 if (cycle.back() == adj->
theNode()) {
193 }
else if (cycle.front() == adj->
twinNode()) {
208 bool checkSize(
int n)
const {
return inside + cycle.
size() > 1.0 / 3.0 * n; }
The namespace for all OGDF objects.
Includes declaration of graph class.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
node theNode() const
Returns the node whose adjacency list contains this element.
E popFrontRet()
Removes the first element from the list and returns it.
void addTriangle(adjEntry adj)
Expands the cycle by adding a triangle.
std::unordered_set< node > nodes
Copies of graphs supporting edge splitting.
bool checkSize(int n) const
Checks the size of this cycle.
Class for adjacency list elements.
Helper class for SeparatorDual and SeparatorDualFC.
Auxiliary lightweight data structure to represent cycles.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
Abstract description of a Breadth First Search tree.
std::shared_ptr< GraphCopy > graph
Doubly linked lists (maintaining the length of the list).
bool isInCycle(node n)
Checks if a node lies on the cycle.
Data type for general directed graphs (adjacency list representation).
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
E popBackRet()
Removes the last element from the list and returns it.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
void removeTriangle(adjEntry adj)
Expands the cycle by removing a triangle.
@ tree
for every hyperedge e a minimal subcubic tree connecting all hypernodes incident with e together is a...
SeparatorDualHelper(std::shared_ptr< GraphCopy > pGraph, std::shared_ptr< BFSTree > pTree)
Basic declarations, included by all source files.
Declaration of CombinatorialEmbedding and face.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
CycleData()
Empty Constructor - only used to be able to throw empty CD in case of algorithm failure.
Combinatorial embeddings of planar graphs with modification functionality.
CombinatorialEmbedding embedding
Declaration of doubly linked lists and iterators.
int size() const
Returns the number of elements in the list.
std::shared_ptr< BFSTree > tree
List< node > cycle
contains nodes on the cycle, starting with v, ending with u, where e = (u,v) is the initial edge
Class for the representation of nodes.
CycleData(const Graph &G, const face f, const adjEntry adj)
Constructor.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Faces in a combinatorial embedding.
CycleData(const Graph &G, CycleData &first, CycleData &second)
Constructor.