|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
54 template<
typename TCost>
78 template<
typename TCost =
int>
113 bool nonPlanarityGuaranteed =
false);
139 for (
edge eInCop : origEdgesOfThisSTComponent.
graphOf()->edges) {
140 if (origEdgesOfThisSTComponent[eInCop] !=
nullptr) {
141 res.
pushBack(origEdgesOfThisSTComponent[eInCop]);
203 bool nonPlanarityGuaranteed);
361 template<
typename TCost>
400 void reorder(
node vLoser,
bool sameDirection,
bool isTNodeOfPNode);
440 template<
typename TCost>
444 , m_real(m_graph, nullptr)
448 , m_mapV(m_graph, nullptr)
449 , m_mapE(m_graph, nullptr)
450 , m_underlyingGraphs(m_graph, nullptr)
454 call(G,
nullptr, &minSTCutBFS, nonPlanarityGuaranteed);
457 template<
typename TCost>
462 , m_real(m_graph, nullptr)
466 , m_mapV(m_graph, nullptr)
467 , m_mapE(m_graph, nullptr)
468 , m_underlyingGraphs(m_graph, nullptr)
471 call(G, &weight, minSTCutModule, nonPlanarityGuaranteed);
474 template<
typename TCost>
476 bool nonPlanarityGuaranteed)
479 , m_real(m_graph, nullptr)
483 , m_mapV(m_graph, nullptr)
484 , m_mapE(m_graph, nullptr)
485 , m_underlyingGraphs(m_graph, nullptr)
489 call(G, &weight, &minSTCutDijkstra, nonPlanarityGuaranteed);
492 template<
typename TCost>
494 for (
auto pointer : m_mapE) {
497 for (
auto pointer : m_mapV) {
500 for (
auto pointer : m_underlyingGraphs) {
505 template<
typename TCost>
508 if (!nonPlanarityGuaranteed &&
isPlanar(G)) {
537 if (map[src] ==
nullptr) {
538 m_orig[map[src] = m_graph.newNode()] = S.
original(e->source());
541 if (map[tgt] ==
nullptr) {
542 m_orig[map[tgt] = m_graph.newNode()] = S.
original(e->target());
550 edge lastCreatedEdge = m_graph.newEdge(map[src], map[tgt]);
551 m_real[lastCreatedEdge] =
nullptr;
552 traversingPath(S, e, m_mincut[lastCreatedEdge], mapAux, lastCreatedEdge, weight,
557 edge lastCreatedEdge = m_graph.newEdge(map[src], map[tgt]);
558 m_real[lastCreatedEdge] = S.
realEdge(e);
559 traversingPath(S, e, m_mincut[lastCreatedEdge], mapAux, lastCreatedEdge, weight,
565 if (weight !=
nullptr) {
566 for (
edge e : m_graph.edges) {
568 for (
auto cutEdge : m_mincut[e]) {
569 cost += (*weight)[cutEdge.e];
574 for (
edge e : m_graph.edges) {
575 m_cost[e] = m_mincut[e].size();
580 m_graph.allNodes(allNodes);
585 getAllMultiedges(winningMultiEdges, losingMultiEdges);
586 while (!winningMultiEdges.empty() && !losingMultiEdges.empty()) {
590 int sizeOfWinCut = m_mincut[winningMultiEdge].size();
591 int sizeOfLosCut = m_mincut[losingMultiEdge].size();
594 glue(winningMultiEdge, losingMultiEdge);
595 glueMincuts(winningMultiEdge, losingMultiEdge);
597 OGDF_ASSERT(m_mincut[winningMultiEdge].size() == sizeOfWinCut + sizeOfLosCut);
598 delete m_underlyingGraphs[losingMultiEdge];
599 delete m_mapV[losingMultiEdge];
600 delete m_mapE[losingMultiEdge];
601 m_real[winningMultiEdge] =
nullptr;
602 m_real[losingMultiEdge] =
nullptr;
603 m_graph.delEdge(losingMultiEdge);
606 for (
node v : allNodes) {
613 if (m_cost[inEdge] > m_cost[outEdge]) {
614 std::swap(inEdge, outEdge);
618 glue(inEdge, outEdge);
620 m_real[inEdge] =
nullptr;
621 m_real[outEdge] =
nullptr;
624 adjEntry adjTarget = (outEdge->target() == v ? outEdge->adjSource()->cyclicSucc()
625 : outEdge->adjTarget()->cyclicSucc());
626 if (inEdge->
target() != v) {
627 adjSource = adjTarget;
631 delete m_underlyingGraphs[outEdge];
632 delete m_mapV[outEdge];
633 delete m_mapE[outEdge];
638 if (nonPlanarityGuaranteed) {
643 template<
typename TCost>
655 if (degree[v] <= 1) {
678 if (degree[w] == 1) {
693 template<
typename TCost>
701 Graph& H = *h_pointer;
719 const Skeleton& S = m_T.skeleton(current);
728 if (mapV[src] ==
nullptr) {
730 mapV[src] = H.newNode();
731 mapV_src[mapV[src]] = src;
733 if (mapV[tgt] ==
nullptr) {
735 mapV[tgt] = H.newNode();
736 mapV_src[mapV[tgt]] = tgt;
739 edge e_new = H.newEdge(mapV[src], mapV[tgt]);
778 if (adjListFront.front() != e_st->
adjSource()) {
779 adjListFront.
split(adjListFront.search(e_st->
adjSource()), adjListFront, adjListBack);
781 H.sort(e_st->
source(), adjListFront);
785 if (adjListFront.front() != e_st->
adjTarget()) {
786 adjListFront.
split(adjListFront.search(e_st->
adjTarget()), adjListFront, adjListBack,
789 H.sort(e_st->
target(), adjListFront);
794 if (weight_src !=
nullptr) {
796 for (
edge e : H.edges) {
798 weight[e] = (*weight_src)[mapE_src[e]];
801 minSTCutModule->
call(H, weight, e_st->
source(), e_st->
target(), edgeList, e_st);
805 auto it = edgeList.begin();
806 for (; it != edgeList.end(); it++) {
815 OGDF_ASSERT(m_underlyingGraphs[coreEdge] ==
nullptr);
816 m_underlyingGraphs[coreEdge] = h_pointer;
818 m_mapE[coreEdge] = mapE_src_pointer;
820 m_mapV[coreEdge] = mapV_src_pointer;
822 for (
node v : H.nodes) {
825 for (
edge e : H.edges) {
830 for (
node v : nodes) {
835 template<
typename TCost>
837 winningEdges.
clear();
845 for (it = ++it; it.
valid(); ++it, ePrev = e) {
847 if (minIndex[ePrev] == minIndex[e] && maxIndex[ePrev] == maxIndex[e]) {
854 template<
typename TCost>
859 bool thisIsAboutAPNode =
false;
861 thisIsAboutAPNode =
true;
865 node sWinner = m_sNode[eWinner];
866 node tWinner = m_tNode[eWinner];
867 node sLoser = m_sNode[eLoser];
868 node tLoser = m_tNode[eLoser];
894 OGDF_ASSERT(!allNodesButSt.search(sLoser).valid());
907 OGDF_ASSERT(!allNodesButSt.search(tLoser).valid());
912 for (
node v : allNodesButSt) {
926 for (
node v : allNodes) {
927 map.
reorder(v, sameDirection, (tLoser == v && thisIsAboutAPNode));
929 if (!thisIsAboutAPNode) {
945 template<
typename TCost>
953 m_endGraph = &planarGraph;
954 m_planarCore = &planarCore;
955 OGDF_ASSERT(!pCisPlanar || m_planarCore->genus() == 0);
957 m_endGraph->setOriginalGraph(*m_pOriginal);
959 m_pOriginal->allNodes(allNodes);
962 m_endGraph->insert(allNodes.begin(), allNodes.end(),
filter_any_edge, nCopy, eCopy);
965 for (
node v : m_endGraph->nodes) {
974 for (
node v : m_planarCore->nodes) {
975 if (m_planarCore->isDummy(v)) {
981 node coreNode = m_planarCore->original(v);
984 edge coreEdge = m_planarCore->original(adjPC->
theEdge());
987 node stNode = (mapV[m_sNode[coreEdge]] == original(coreNode) ? m_sNode[coreEdge]
988 : m_tNode[coreEdge]);
992 newOrder.
pushBack(m_endGraph->copy(mapE[adjEmb->
theEdge()])->adjSource());
994 newOrder.
pushBack(m_endGraph->copy(mapE[adjEmb->
theEdge()])->adjTarget());
998 m_endGraph->sort(m_endGraph->copy(original(coreNode)), newOrder);
1001 for (
edge e : m_graph.edges) {
1007 for (
edge e : m_graph.edges) {
1012 normalizeCutEdgeDirection(e);
1015 splitEdgeIntoSections(e, splitdummies);
1020 for (
node v : m_planarCore->nodes) {
1021 if (m_planarCore->isDummy(v)) {
1027 removeSplitdummies(splitdummies);
1028 for (
edge e : m_graph.edges) {
1029 normalizeCutEdgeDirection(e);
1034 template<
typename TCost>
1036 for (
auto cutE : m_mincut[coreEdge]) {
1038 for (
edge e : m_endGraph->chain(cutE.e)) {
1039 m_endGraph->reverseEdge(e);
1045 template<
typename TCost>
1047 for (
node v : splitdummies) {
1048 edge eIn = v->firstAdj()->theEdge();
1049 edge eOut = v->lastAdj()->theEdge();
1050 if (eIn->
target() == v) {
1051 m_endGraph->unsplit(eIn, eOut);
1053 m_endGraph->unsplit(eOut, eIn);
1058 template<
typename TCost>
1061 int chainSize = chain.
size();
1062 while (chainSize > 2) {
1063 for (
CutEdge cutEdge : mincut(e)) {
1064 splitdummies.
pushBack(m_endGraph->split(m_endGraph->copy(cutEdge.e))->source());
1069 for (
CutEdge cutEdge : mincut(e)) {
1070 if (chain.
size() < 3) {
1071 OGDF_ASSERT(m_endGraph->chain(cutEdge.e).size() == 1);
1075 OGDF_ASSERT(m_endGraph->original(m_endGraph->chain(cutEdge.e).front()) == cutEdge.e);
1080 template<
typename TCost>
1082 const Graph& embG = *m_underlyingGraphs[e];
1091 for (
auto it = mapE_toOrig.begin(); it != mapE_toOrig.end(); it++) {
1095 mapA_toFinal[it.key()->adjSource()] = m_endGraph->chain(*it).front()->adjSource();
1096 mapA_toFinal[it.key()->adjTarget()] = m_endGraph->chain(*it).back()->adjTarget();
1098 node s(m_sNode[e]), t(m_tNode[e]);
1103 for (
node v : nodesOfEmb) {
1104 if (v == s || v == t) {
1108 for (
adjEntry adj = v->firstAdj(); adj; adj = adj->
succ()) {
1109 rightAdjOrder.
pushBack(mapA_toFinal[adj]);
1111 m_endGraph->sort(m_endGraph->copy(mapV_toOrig[v]), rightAdjOrder);
1115 template<
typename TCost>
1125 while (e1->
target() != v) {
1129 while (e2->
target() != v) {
1139 getMincut(e1, e1cut);
1141 getMincut(e2, e2cut);
1147 for (
int i = 0; i < e1cut.
size(); i++) {
1148 auto it1 = e1cut.get(i);
1149 edge crossingEdge = *it1;
1150 for (
int j = 0; j < e2cut.
size(); j++) {
1151 auto it2 = e2cut.get(j);
1152 edge crossedEdge = *it2;
1153 m_endGraph->insertCrossing(*it1, crossedEdge,
true);
1164 template<
typename TCost>
1170 List<edge> chain = m_planarCore->chain(m_planarCore->original(e));
1175 for (
CutEdge eCut : mincut(m_planarCore->original(e))) {
1179 auto it = m_endGraph->chain(eCut.e).begin();
1180 for (
int i = 0; i < chain.pos(chain.search(e)); i++) {
1182 while ((*it)->source()->degree() == 4) {
1192 template<
typename TCost>
1209 for (
auto cutEit = losecut.begin(); cutEit != losecut.end(); cutEit++) {
1212 losecut = newLosecut;
1215 wincut.
conc(losecut);
1216 m_mincut[eWinner] = wincut;
1217 m_cost[eWinner] += m_cost[eLoser];
1220 template<
typename TCost>
1222 : m_npc(npc), m_eWinner(eWinner), m_eLoser(eLoser) {
1255 template<
typename TCost>
1257 edge newEdge = m_gWinner->newEdge(m_mapV_l2w[loser->
source()], m_mapV_l2w[loser->
target()]);
1258 m_mapE_l2w[loser] = newEdge;
1259 (*m_mapEwinner)[newEdge] = (*m_mapEloser)[loser];
1262 template<
typename TCost>
1264 m_mapV_l2w[loser] = winner;
1265 (*m_mapVwinner)[winner] = (*m_mapVloser)[loser];
1268 template<
typename TCost>
1270 node newNode = m_gWinner->newNode();
1271 m_mapV_l2w[loser] = newNode;
1272 (*m_mapVwinner)[newNode] = (*m_mapVloser)[loser];
1275 template<
typename TCost>
1277 node vWinner = m_mapV_l2w[vLoser];
1296 if (!sameDirection) {
1297 rightAdjOrder.reverse();
1299 if (adjOrder.
size() == rightAdjOrder.
size()) {
1300 adjOrder = rightAdjOrder;
1303 adjOrder.
split(adjOrder.get(adjOrder.
size() - rightAdjOrder.
size()), adjOrder, helpList);
1304 if (isTNodeOfPNode) {
1307 adjOrder.
conc(rightAdjOrder);
1310 m_gWinner->sort(vWinner, adjOrder);
void getMincut(edge e, List< edge > &cut)
Get the mincut of e with respect to its position in the chain of its original edge.
The namespace for all OGDF objects.
const GraphCopy * m_planarCore
A pointer to a copy of the core, in which crossings are replaced by dummy nodes.
virtual bool isVirtual(edge e) const =0
Returns true iff e is a virtual edge.
iterator append(const E &x)
Adds x at the end of queue.
Includes declaration of graph class.
const bool dir
true, iff the edge is directed from the s partition to the t partion
const edge m_eWinner
The core edge that will survive.
List< edge > original(edge e) const
Returns the edges of the original graph, which are represented by e in the core.
void glue(edge eWinner, edge eLoser)
Glues together the skeletons of eWinner and eLoser for pruned P- and S-nodes.
EdgeArray< edge > * m_mapEwinner
A map from the edges of the winner graph to the original graph, to denote the original of each edge.
Linear-time implementation of static SPQR-trees.
Graph * graphOf() const
Returns a pointer to the associated graph.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void conc(List< E > &L2)
Appends L2 to this list and makes L2 empty.
void reorder(node vLoser, bool sameDirection, bool isTNodeOfPNode)
This method reorders the adjacency order of vLoser's counterpart in the winner graph according to the...
const Graph & getLoserGraph() const
Getter for m_gLoser.
node theNode() const
Returns the node whose adjacency list contains this element.
virtual bool direction(edge e)
Returns the direction of e in the cut.
bool isParallelUndirected(edge e) const
Returns true iff edge e is parallel to this (undirected) edge (or if it is the same edge)
edge realEdge(edge e) const
Returns the edge of the orginal graph, which is represented by e or nullptr iff e is virtual.
Declaration of class SPQRTree.
virtual edge realEdge(edge e) const =0
Returns the real edge that corresponds to skeleton edge e.
void importEmbedding(edge e)
This method asserts that all parts of the end graph that are represented by edge e internally have th...
Non-planar core reduction.
adjEntry lastAdj() const
Returns the last entry in the adjacency list.
void split(iterator it, List< E > &L1, List< E > &L2, Direction dir=Direction::before)
Splits the list at element it into lists L1 and L2.
E popFrontRet()
Removes the first element from the list and returns it.
void call(const Graph &G, const EdgeArray< TCost > *weight, MinSTCutModule< TCost > *minSTCutModule, bool nonPlanarityGuaranteed)
The private method behind the constructors.
Declaration of extended graph algorithms.
Declaration of class StaticSPQRTree.
void allNodes(CONTAINER &nodeContainer) const
Returns a container with all nodes of the graph.
Encapsulates a pointer to an ogdf::SList element.
void glueMincuts(edge eWinner, edge eLoser)
Glues together the mincuts of the winner and the loser edge.
void markCore(NodeArray< bool > &mark)
Marks all nodes of the underlying SPQRTree and prunes planar leaves until the marked nodes span a tre...
Min-st-cut algorithm, that calculates the cut by doing a depth first search over the dual graph of of...
TCost cost(edge e) const
Returns the cost of e, which is the number of original edges crossed, if e is crossed,...
bool isInvertedDirected(edge e) const
Returns true iff edge e is an inverted edge to this (directed) edge.
bool filter_any_edge(edge e)
std::function<bool(edge)> that returns true for any edge e
Copies of graphs supporting edge splitting.
const EdgeArray< edge > * m_mapEloser
A map from the edges of the loser graph to the original graph, to denote the original of each node.
bool isPlanar(const Graph &G)
Returns true, if G is planar, false otherwise.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
CutEdge(edge paramEdge, bool directed)
EdgeArray< edge > m_real
Corresp. original edge (0 if virtual)
const Graph * m_gLoser
The graph that eLoser represents.
node tNode(edge e) const
Returns the t node of the skeleton of the st-component represented by the core edge e = (s,...
void parallelFreeSortUndirected(const Graph &G, SListPure< edge > &edges, EdgeArray< int > &minIndex, EdgeArray< int > &maxIndex)
Sorts the edges of G such that undirected parallel edges come after each other in the list.
node treeNode() const
Returns the corresponding node in the owner tree T to which S belongs.
bool valid() const
Returns true iff the iterator points to an element.
void mapLoserToWinnerNode(node vInLoser, node vInWinner)
A mapping from the vInLoser to the vInWinner is created.
GlueMap(edge eWinner, edge eLoser, NonPlanarCore< TCost > &npc)
A GlueMap is created from an NonPlanarCore and two core edges that ought to be glued together.
This is a helper class to make the glueing of two edges simpler.
iterator insertAfter(const E &x, iterator it)
Inserts element x after it.
void mapLoserToNewWinnerEdge(edge eInLoser)
A mapping from the eInLoser graph to a new edge in the winner graph is created.
bool isVirtual(edge e) const
True iff the edge e in the core represents more than one orginal edge and therefore is virtual.
Graph * m_gWinner
The graph that eWinner represents.
node getWinnerNodeOfLoserNode(node v) const
Getter for m_mapV_l2w.
iterator begin()
Returns an iterator to the first element of the list.
void concFront(List< E > &L2)
Prepends L2 to this list and makes L2 empty.
Class for adjacency list elements.
void retransform(const GraphCopy &planarCore, GraphCopy &planarGraph, bool pCisPlanar=true)
Inserts the crossings from a copy of the core into a copy of the original graph.
virtual bool call(const Graph &graph, const EdgeArray< TCost > &weight, node s, node t, List< edge > &edgeList, edge e_st=nullptr)=0
The actual algorithm call.
edge theEdge() const
Returns the edge associated with this adjacency entry.
Declaration of class Skeleton.
const Graph * graphOf() const
Returns the graph containing this node (debug only).
int degree() const
Returns the degree of the node (indegree + outdegree).
const Graph * m_pOriginal
The original graph.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
EdgeArray< edge > m_mapE_l2w
A map from the edges of the loser graph to their new home in the winner graph.
void getAllMultiedges(List< edge > &winningEdges, List< edge > &losingEdges)
Checks for multiedges in the core.
NonPlanarCore< TCost > & m_npc
The NonPlanarCore on which this instance operates.
int numberOfNodes() const
Returns the number of nodes in the graph.
EdgeArray< node > m_sNode
The s node of the st-component of a core edge.
const edge m_eLoser
The core edge that will be deleted.
E pop()
Removes front element and returns it.
const EdgeArray< TCost > & cost() const
Returns the costs of the edges in the core, which is the number of original edges crossed,...
Declaration of singly linked lists and iterators.
Decralation of GraphElement and GraphList classes.
adjEntry succ() const
Returns the successor in the adjacency list.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
StaticSPQRTree m_T
The SPQRTree that represents the original graph.
EdgeArray< edge > * mapE(edge e) const
Returns a map from the edges of the st-component represented by the core edge e to the original graph...
NodeArray< node > m_mapV_l2w
A map from the nodes of the loser graph to their new home in the winner graph.
GraphCopy * m_endGraph
A pointer to a copy of the original graph, in which crossings are replaced by dummy nodes.
bool planarEmbed(Graph &G)
Returns true, if G is planar, false otherwise. If true is returned, G will be planarly embedded.
node source() const
Returns the source node of the edge.
const List< CutEdge > & mincut(edge e) const
Returns the mincut of the st-component represented by e.
NodeArray< node > * m_mapVwinner
A map from the nodes of the winner graph to the original graph, to denote the original of each edge.
Declaration of graph copy classes.
RegisteredArray for nodes, edges and adjEntries of a graph.
The parameterized class Queue<E> implements list-based queues.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
Data type for general directed graphs (adjacency list representation).
EdgeArray< Graph * > m_underlyingGraphs
The graph for the underlying skeleton of a virtual edge in the core.
NodeArray< node > m_orig
Corresp. original node.
virtual node twinTreeNode(edge e) const =0
Returns the tree node in T containing the twin edge of skeleton edge e.
const Graph & getGraph() const
Returns a reference to the skeleton graph M.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
adjEntry cyclicSucc() const
Returns the cyclic successor in the adjacency list.
void removeSplitdummies(List< node > &splitdummies)
After inserting the crossings, the end graph edges don't need to be partitioned anymore so the splitd...
@ tree
for every hyperedge e a minimal subcubic tree connecting all hypernodes incident with e together is a...
bool empty() const
Returns true iff the queue is empty.
Min-st-cut algorithm, that calculates the cut by calculating the shortest path between the faces adja...
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
void allAdjEntries(ADJLIST &adjList) const
Returns a list with all adjacency entries of this node.
EdgeArray< NodeArray< node > * > m_mapV
The mapping between the nodes of each embedding and their original.
Declaration of min-st-cut algorithm which calculates the min-st-cut of an st-planar graph by doing a ...
EdgeArray< node > m_tNode
The t node of the st-component of a core edge.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
node original(node v) const
Returns the node of the original graph, which is represented by v in the core.
Struct to represent an edge that needs to be crossed in order to cross an st-component.
void splitEdgeIntoSections(edge e, List< node > &splitdummies)
To be able to insert crossings correctly, an end graph edge ought to be split into n-1 sections if n ...
void del(iterator it)
Removes it from the list.
Basic declarations, included by all source files.
Declaration of CombinatorialEmbedding and face.
EdgeArray< List< CutEdge > > m_mincut
Traversing path for an edge in the core.
Combinatorial embeddings of planar graphs with modification functionality.
void inflateCrossing(node v)
The crossing denoted by dummy node v from the planarized copy of the core get inserted into the end g...
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
bool isBiconnected(const Graph &G, node &cutVertex)
Returns true iff G is biconnected.
void mapLoserToNewWinnerNode(node vInLoser)
A mapping from the vInLoser to a new node in the winner graph is created.
QueueEntry(node p, node v)
const Graph & originalGraph() const
Returns the original graph.
Class for the representation of edges.
const Graph & core() const
Returns the non-planar core.
Declaration of doubly linked lists and iterators.
Skeleton graphs of nodes in an SPQR-tree.
void init(const Graph *base=nullptr)
Reinitializes the array. Associates the array with the matching registry of base.
virtual node original(node v) const =0
Returns the vertex in the original graph G that corresponds to v.
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.
EdgeArray< TCost > m_cost
TCosts to cross each edge of the core.
void traversingPath(const Skeleton &Sv, edge eS, List< CutEdge > &path, NodeArray< node > &mapV, edge coreEdge, const EdgeArray< TCost > *weight_src, MinSTCutModule< TCost > *minSTCutModule)
Computes the traversing path for a given edge and the unmarked tree rooted in the node of eS and save...
EdgeArray< EdgeArray< edge > * > m_mapE
The mapping between the edges of each embedding and their original.
NonPlanarCore(const Graph &G, bool nonPlanarityGuaranteed=false)
The unweighted version of the Algorithm call and constructor.
node sNode(edge e) const
Returns the s node of the skeleton of the st-component represented by the core edge e = (s,...
node target() const
Returns the target node of the edge.
void removePseudoCrossings()
Removes all crossing nodes which are actually only two "touching" edges.
const NodeArray< node > * m_mapVloser
A map from the nodes of the loser graph to the original graph, to denote the original of each node.
Class for the representation of nodes.
bool removeFirst(const E &x)
Removes the first occurrence of x (if any) from the list.
MinSTCutDijkstra class template.
Declaration of simple graph algorithms.
void normalizeCutEdgeDirection(edge coreEdge)
Every edge of coreEdge's cut that doesn't go the same direction as coreEdge gets reversed.
iterator pushBack(const E &x)
Adds element x at the end of the list.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
void clear()
Removes all elements from the list.