54template<
typename TCost>
78template<
typename TCost =
int>
113 bool nonPlanarityGuaranteed =
false);
140 if (origEdgesOfThisSTComponent[eInCop] !=
nullptr) {
141 res.
pushBack(origEdgesOfThisSTComponent[eInCop]);
203 bool nonPlanarityGuaranteed);
361template<
typename TCost>
400 void reorder(
node vLoser,
bool sameDirection,
bool isTNodeOfPNode);
440template<
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);
457template<
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);
474template<
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);
492template<
typename TCost>
494 for (
auto pointer : m_mapE) {
497 for (
auto pointer : m_mapV) {
500 for (
auto pointer : m_underlyingGraphs) {
505template<
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) {
607 if (v->degree() != 2) {
610 edge outEdge = v->firstAdj()->theEdge();
611 edge inEdge = v->lastAdj()->theEdge();
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;
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) {
643template<
typename TCost>
654 degree[v] = v->degree();
655 if (degree[v] <= 1) {
669 node x = adj->twinNode();
678 if (degree[w] == 1) {
693template<
typename TCost>
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]);
745 node w = adj->twinNode();
781 H.sort(e_st->
source(), adjListFront);
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]];
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) {
835template<
typename TCost>
837 winningEdges.
clear();
845 for (it = ++it; it.
valid(); ++it, ePrev = e) {
847 if (minIndex[ePrev] == minIndex[e] && maxIndex[ePrev] == maxIndex[e]) {
854template<
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];
912 for (
node v : allNodesButSt) {
926 for (
node v : allNodes) {
927 map.
reorder(v, sameDirection, (tLoser == v && thisIsAboutAPNode));
929 if (!thisIsAboutAPNode) {
945template<
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);
965 for (
node v : m_endGraph->nodes) {
967 v->allAdjEntries(adjEntries);
974 for (
node v : m_planarCore->nodes) {
975 if (m_planarCore->isDummy(v)) {
979 v->allAdjEntries(pcOrder);
981 node coreNode = m_planarCore->original(v);
983 for (
adjEntry adjPC : v->adjEntries) {
984 edge coreEdge = m_planarCore->original(adjPC->theEdge());
987 node stNode = (mapV[m_sNode[coreEdge]] == original(coreNode) ? m_sNode[coreEdge]
988 : m_tNode[coreEdge]);
991 if (adjEmb->theEdge()->source() == adjEmb->theNode()) {
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);
1034template<
typename TCost>
1036 for (
auto cutE : m_mincut[coreEdge]) {
1038 for (
edge e : m_endGraph->chain(cutE.e)) {
1039 m_endGraph->reverseEdge(e);
1045template<
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);
1058template<
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);
1080template<
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);
1115template<
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);
1164template<
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) {
1192template<
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];
1220template<
typename TCost>
1222 : m_npc(npc), m_eWinner(eWinner), m_eLoser(eLoser) {
1255template<
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];
1262template<
typename TCost>
1264 m_mapV_l2w[loser] = winner;
1265 (*m_mapVwinner)[winner] = (*m_mapVloser)[loser];
1268template<
typename TCost>
1270 node newNode = m_gWinner->newNode();
1271 m_mapV_l2w[loser] = newNode;
1272 (*m_mapVwinner)[newNode] = (*m_mapVloser)[loser];
1275template<
typename TCost>
1277 node vWinner = m_mapV_l2w[vLoser];
1287 OGDF_ASSERT(m_mapE_l2w[adj->theEdge()] !=
nullptr);
1288 edge edgeInWinner = m_mapE_l2w[adj->theEdge()];
1289 adjEntry adj_in = (adj->theEdge()->adjSource() == adj ? edgeInWinner->
adjSource()
1296 if (!sameDirection) {
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);
Declaration of CombinatorialEmbedding and face.
Includes declaration of graph class.
Declaration of graph copy classes.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Declaration of min-st-cut algorithm which calculates the min-st-cut of an st-planar graph by doing a ...
MinSTCutDijkstra class template.
Declaration of singly linked lists and iterators.
Declaration of class SPQRTree.
Declaration of class Skeleton.
Declaration of class StaticSPQRTree.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
Basic declarations, included by all source files.
Class for adjacency list elements.
adjEntry cyclicSucc() const
Returns the cyclic successor in the adjacency list.
adjEntry succ() const
Returns the successor in the adjacency list.
edge theEdge() const
Returns the edge associated with this adjacency entry.
node theNode() const
Returns the node whose adjacency list contains this element.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
const Graph * graphOf() const
Returns the graph containing this node (debug only).
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
bool isInvertedDirected(edge e) const
Returns true iff edge e is an inverted edge to this (directed) edge.
bool isParallelUndirected(edge e) const
Returns true iff edge e is parallel to this (undirected) edge (or if it is the same edge)
node target() const
Returns the target node of the edge.
node source() const
Returns the source node of the edge.
This is a helper class to make the glueing of two edges simpler.
void mapLoserToNewWinnerEdge(edge eInLoser)
A mapping from the eInLoser graph to a new edge in the winner graph is created.
node getWinnerNodeOfLoserNode(node v) const
Getter for m_mapV_l2w.
const edge m_eWinner
The core edge that will survive.
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.
void mapLoserToWinnerNode(node vInLoser, node vInWinner)
A mapping from the vInLoser to the vInWinner is created.
NodeArray< node > m_mapV_l2w
A map from the nodes of the loser graph to their new home in the winner graph.
EdgeArray< edge > m_mapE_l2w
A map from the edges of the loser graph to their new home in the winner graph.
const Graph * m_gLoser
The graph that eLoser represents.
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 edge m_eLoser
The core edge that will be deleted.
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.
Graph * m_gWinner
The graph that eWinner represents.
NodeArray< node > * m_mapVwinner
A map from the nodes of the winner graph to the original graph, to denote the original of each edge.
EdgeArray< edge > * m_mapEwinner
A map from the edges of the winner graph to the original graph, to denote the original of each edge.
void mapLoserToNewWinnerNode(node vInLoser)
A mapping from the vInLoser to a new node in the winner graph is created.
NonPlanarCore< TCost > & m_npc
The NonPlanarCore on which this instance operates.
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.
const Graph & getLoserGraph() const
Getter for m_gLoser.
Copies of graphs supporting edge splitting.
void removePseudoCrossings()
Removes all crossing nodes which are actually only two "touching" edges.
Data type for general directed graphs (adjacency list representation).
int numberOfNodes() const
Returns the number of nodes in the graph.
void allNodes(CONTAINER &nodeContainer) const
Returns a container with all nodes of the graph.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Doubly linked lists (maintaining the length of the list).
int size() const
Returns the number of elements in the list.
void clear()
Removes all elements from the list.
iterator pushBack(const E &x)
Adds element x at the end of the list.
bool removeFirst(const E &x)
Removes the first occurrence of x (if any) from the list.
void del(iterator it)
Removes it from the 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.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
iterator insertAfter(const E &x, iterator it)
Inserts element x after it.
E popFrontRet()
Removes the first element from the list and returns it.
void concFront(List< E > &L2)
Prepends L2 to this list and makes L2 empty.
void conc(List< E > &L2)
Appends L2 to this list and makes L2 empty.
iterator begin()
Returns an iterator to the first element of the list.
void reverse()
Reverses the order of the list elements.
int pos(const_iterator it) const
Returns the position (starting with 0) of iterator it in the list.
const_reference front() const
Returns a const reference to the first element.
const_iterator get(int pos) const
Returns a const iterator pointing to the element at position pos.
bool empty() const
Returns true iff the list is empty.
ListConstIterator< E > search(const E &e) const
Scans the list for the specified element and returns an iterator to the first occurrence in the list,...
iterator end()
Returns an iterator to one-past-last element of the list.
Min-st-cut algorithm, that calculates the cut by doing a depth first search over the dual graph of of...
Min-st-cut algorithm, that calculates the cut by calculating the shortest path between the faces adja...
virtual bool direction(edge e)
Returns the direction of e in the cut.
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.
Class for the representation of nodes.
void allAdjEntries(ADJLIST &adjList) const
Returns a list with all adjacency entries of this node.
int degree() const
Returns the degree of the node (indegree + outdegree).
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
Non-planar core reduction.
EdgeArray< List< CutEdge > > m_mincut
Traversing path for an edge in the core.
const Graph & originalGraph() const
Returns the original graph.
void glue(edge eWinner, edge eLoser)
Glues together the skeletons of eWinner and eLoser for pruned P- and S-nodes.
List< edge > original(edge e) const
Returns the edges of the original graph, which are represented by e in the core.
NodeArray< node > m_orig
Corresp. original node.
const EdgeArray< TCost > & cost() const
Returns the costs of the edges in the core, which is the number of original edges crossed,...
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...
node tNode(edge e) const
Returns the t node of the skeleton of the st-component represented by the core edge e = (s,...
void inflateCrossing(node v)
The crossing denoted by dummy node v from the planarized copy of the core get inserted into the end g...
bool isVirtual(edge e) const
True iff the edge e in the core represents more than one orginal edge and therefore is virtual.
const GraphCopy * m_planarCore
A pointer to a copy of the core, in which crossings are replaced by dummy nodes.
const List< CutEdge > & mincut(edge e) const
Returns the mincut of the st-component represented by e.
void getAllMultiedges(List< edge > &winningEdges, List< edge > &losingEdges)
Checks for multiedges in the core.
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.
const Graph * m_pOriginal
The original graph.
void markCore(NodeArray< bool > &mark)
Marks all nodes of the underlying SPQRTree and prunes planar leaves until the marked nodes span a tre...
node original(node v) const
Returns the node of the original graph, which is represented by v in the core.
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...
void importEmbedding(edge e)
This method asserts that all parts of the end graph that are represented by edge e internally have th...
EdgeArray< node > m_tNode
The t node of the st-component of a core edge.
StaticSPQRTree m_T
The SPQRTree that represents the original graph.
NonPlanarCore(const Graph &G, const EdgeArray< TCost > &weight, MinSTCutModule< TCost > *minSTCutModule, bool nonPlanarityGuaranteed=false)
Algorithm call and constructor.
EdgeArray< node > m_sNode
The s node of the st-component of a core edge.
void call(const Graph &G, const EdgeArray< TCost > *weight, MinSTCutModule< TCost > *minSTCutModule, bool nonPlanarityGuaranteed)
The private method behind the constructors.
node sNode(edge e) const
Returns the s node of the skeleton of the st-component represented by the core edge e = (s,...
void normalizeCutEdgeDirection(edge coreEdge)
Every edge of coreEdge's cut that doesn't go the same direction as coreEdge gets reversed.
void glueMincuts(edge eWinner, edge eLoser)
Glues together the mincuts of the winner and the loser edge.
GraphCopy * m_endGraph
A pointer to a copy of the original graph, in which crossings are replaced by dummy nodes.
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 ...
NonPlanarCore(const Graph &G, bool nonPlanarityGuaranteed=false)
The unweighted version of the Algorithm call and constructor.
EdgeArray< NodeArray< node > * > m_mapV
The mapping between the nodes of each embedding and their original.
EdgeArray< TCost > m_cost
TCosts to cross each edge of the core.
const Graph & core() const
Returns the non-planar core.
void getMincut(edge e, List< edge > &cut)
Get the mincut of e with respect to its position in the chain of its original edge.
TCost cost(edge e) const
Returns the cost of e, which is the number of original edges crossed, if e is crossed,...
NonPlanarCore(const Graph &G, const EdgeArray< TCost > &weight, bool nonPlanarityGuaranteed=false)
An slimmed version of the Algorithm call and constructor.
EdgeArray< EdgeArray< edge > * > m_mapE
The mapping between the edges of each embedding and their original.
EdgeArray< Graph * > m_underlyingGraphs
The graph for the underlying skeleton of a virtual edge in the core.
edge realEdge(edge e) const
Returns the edge of the orginal graph, which is represented by e or nullptr iff e is virtual.
void removeSplitdummies(List< node > &splitdummies)
After inserting the crossings, the end graph edges don't need to be partitioned anymore so the splitd...
EdgeArray< edge > m_real
Corresp. original edge (0 if virtual)
The parameterized class Queue<E> implements list-based queues.
E pop()
Removes front element and returns it.
bool empty() const
Returns true iff the queue is empty.
iterator append(const E &x)
Adds x at the end of queue.
void init(const Base *base=nullptr)
Reinitializes the array. Associates the array with the matching registry of base.
Encapsulates a pointer to an ogdf::SList element.
bool valid() const
Returns true iff the iterator points to an element.
iterator begin()
Returns an iterator to the first element of the list.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Skeleton graphs of nodes in an SPQR-tree.
virtual node original(node v) const =0
Returns the vertex in the original graph G that corresponds to v.
virtual edge realEdge(edge e) const =0
Returns the real edge that corresponds to skeleton edge e.
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.
virtual bool isVirtual(edge e) const =0
Returns true iff e is a virtual edge.
node treeNode() const
Returns the corresponding node in the owner tree T to which S belongs.
Linear-time implementation of static SPQR-trees.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
Graph * graphOf() const
Returns a pointer to the associated graph.
Declaration of extended graph algorithms.
bool isBiconnected(const Graph &G, node &cutVertex)
Returns true iff G is biconnected.
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.
bool planarEmbed(Graph &G)
Returns true, if G is planar, false otherwise. If true is returned, G will be planarly embedded.
bool isPlanar(const Graph &G)
Returns true, if G is planar, false otherwise.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.
@ tree
for every hyperedge e a minimal subcubic tree connecting all hypernodes incident with e together is a...
bool filter_any_edge(edge e)
std::function<bool(edge)> that returns true for any edge e
Declaration of simple graph algorithms.
Struct to represent an edge that needs to be crossed in order to cross an st-component.
const bool dir
true, iff the edge is directed from the s partition to the t partion
CutEdge(edge paramEdge, bool directed)
QueueEntry(node p, node v)