71 m_primalNode.init(*
this,
nullptr);
73 m_primalNode.init(*
this);
91 m_primalEdge[
eDual] = e;
92 m_dualEdge[e] =
eDual;
101 edge e = adj->theEdge();
124 m_dualFace[v] =
fDual;
125 m_primalNode[
fDual] = v;
219#ifdef OGDF_HEAVY_DEBUG
231 m_primalEmbedding.unsplit(
eIn,
eOut);
239#ifdef OGDF_HEAVY_DEBUG
272#ifdef OGDF_HEAVY_DEBUG
282 edge dualEdge {m_dualEdge[e]};
294#ifdef OGDF_HEAVY_DEBUG
305 face oldPrimalFace {m_primalEmbedding.rightFace(
adjSrc)};
319 node newDualNode {CombinatorialEmbedding::splitNode(leftAdj, rightAdj)};
332#ifdef OGDF_HEAVY_DEBUG
342 return addEdgeToIsolatedNodePrimal(
adjTgt, v,
false);
348 return addEdgeToIsolatedNodePrimal(
adjSrc, v,
true);
357 face oldPrimalFace {m_primalEmbedding.joinFaces(e)};
363#ifdef OGDF_HEAVY_DEBUG
367 return oldPrimalFace;
376 edge dualEdge {m_dualEdge[primalEdge]};
381 m_primalEmbedding.removeDeg1(v);
385 CombinatorialEmbedding::joinFaces(dualEdge);
390#ifdef OGDF_HEAVY_DEBUG
398 m_primalEmbedding.reverseEdge(e);
399 CombinatorialEmbedding::reverseEdge(m_dualEdge[e]);
401#ifdef OGDF_HEAVY_DEBUG
409 Embedding::consistencyCheck();
427 for (face
fDual : Embedding::faces) {
447 face oldPrimalFace {m_primalEmbedding.rightFace(adj)};
455 : m_primalEmbedding.addEdgeToIsolatedNode(v, adj)};
481#ifdef OGDF_HEAVY_DEBUG
492 : m_dualEdge[
primalAdj->theEdge()]->adjTarget();
Declaration of CombinatorialEmbedding and face.
Declaration and implementation of EdgeArray class.
declaration and implementation of FaceArray class
Declaration and implementation of NodeArray class.
Class for adjacency list elements.
adjEntry faceCyclePred() const
Returns the cyclic predecessor in face.
edge theEdge() const
Returns the edge associated with this adjacency entry.
bool isSource() const
Returns true iff this is the source adjacency entry of the corresponding edge.
node theNode() const
Returns the node whose adjacency list contains this element.
Combinatorial embeddings of planar graphs with modification functionality.
Combinatorial embeddings of planar graphs.
A dual graph including its combinatorial embedding of an embedded graph.
const face & primalFace(node v) const
Returns the face in the embedding of the primal graph corresponding to v.
void removeDeg1Primal(node v)
Removes degree-1 node v.
~DualGraphBase()
Destructor.
node splitNodePrimal(adjEntry adjStartLeft, adjEntry adjStartRight)
Splits a node while preserving the order of adjacency entries.
typename std::conditional< isConst, const ConstCombinatorialEmbedding, CombinatorialEmbedding >::type Embedding
FaceArray< node > m_dualNode
The corresponding node in the dual graph.
const face & dualFace(node v) const
Returns the face in the embedding of the dual graph corresponding to v.
FaceArray< node > m_primalNode
The corresponding node in the primal graph.
edge addEdgeToIsolatedNodePrimal(adjEntry adjSrc, node v)
Inserts a new edge similarly to splitFace without having to call computeFaces again.
Embedding & m_primalEmbedding
The embedding of the primal graph.
EdgeArray< edge > m_primalEdge
The corresponding edge in the primal graph.
face joinFacesPrimal(edge e)
Removes edge e and joins the two faces adjacent to e.
void reverseEdgePrimal(edge e)
Reverses edges e and updates embedding.
edge splitPrimal(edge e)
Splits edge e=(v,w) into e=(v,u) and e'=(u,w) creating a new node u.
edge splitFacePrimal(adjEntry adjSrc, adjEntry adjTgt, bool sourceAfter=false)
Splits a face by inserting a new edge.
void unsplitPrimal(edge eIn, edge eOut)
Undoes a split operation.
const edge & primalEdge(edge e) const
Returns the edge in the primal graph corresponding to e.
node contractPrimal(edge e, bool keepSelfLoops=false)
Contracts edge e while preserving the order of adjacency entries.
NodeArray< face > m_dualFace
The corresponding face in embedding of the dual graph.
const Graph & getPrimalGraph() const
Returns a reference to the primal graph.
DualGraphBase(Embedding &CE)
Constructor; creates dual graph and its combinatorial embedding.
const node & dualNode(face f) const
Returns the node in the dual graph corresponding to f.
Embedding & getPrimalEmbedding() const
Returns a reference to the combinatorial embedding of the primal graph.
edge addEdgeToIsolatedNodePrimal(adjEntry adj, node v, bool adjSrc)
Inserts a new edge similarly to splitFace without having to call computeFaces again.
const node & primalNode(face f) const
Returns the node in the primal graph corresponding to f.
adjEntry dualAdj(adjEntry primalAdj, bool reverse=false)
Returns the corresponding adjEntry of the dual edge of primalAdj (or the opposite adjEntry of the dua...
EdgeArray< edge > m_dualEdge
The corresponding edge in the dual graph.
const edge & dualEdge(edge e) const
Returns the edge in the dual graph corresponding to e.
NodeArray< face > m_primalFace
The corresponding facee in the embedding of the primal graph.
edge addEdgeToIsolatedNodePrimal(node v, adjEntry adjTgt)
Inserts a new edge similarly to splitFace without having to call computeFaces again.
Dynamic arrays indexed with edges.
Class for the representation of edges.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
node target() const
Returns the target node of the edge.
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).
iterator pushBack(const E &x)
Adds element x at the end of the list.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
int degree() const
Returns the degree of the node (indegree + outdegree).
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.