70 const node& n =
nullptr);
270 const node& leftNode,
277 const node& n =
nullptr);
307 const node& leftNode,
343 const node& leftNode,
382 const node& leftNode,
423 const node& leftNode,
453 compute(G, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
464 if (sizeMu > biggestFace)
466 biggestFace = sizeMu;
478 bool alreadySeenMu =
false;
479 for (
int j = 0; j < i && !alreadySeenMu; j++)
481 if (mus[i] == mus[j])
482 alreadySeenMu =
true;
494 nodeLength, edgeLengthSkel);
495 if (sizeInMu > biggestFace)
497 biggestFace = sizeInMu;
512 adjExternal =
nullptr;
515 expandEdge(spqrTree, treeNodeTreated, bigFaceMu,
nullptr, nodeLength,
516 edgeLengthSkel, newOrder, adjBeforeNodeArraySource,
517 adjBeforeNodeArrayTarget, adjExternal, n);
520 G.
sort(v, newOrder[v]);
531 const node& leftNode,
549 if (!treeNodeTreated[twinNT])
553 m_leftNode = twinE->
source();
555 m_leftNode = twinE->
target();
558 adjBeforeNodeArraySource[twinNT] = before;
560 adjBeforeNodeArrayTarget[twinNT] =
before;
563 expandEdge(spqrTree, treeNodeTreated, twinNT, m_leftNode,
564 nodeLength, edgeLength, newOrder,
565 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
569 if (ae->
theEdge() == referenceEdge)
574 adjBeforeNodeArraySource[mu] =
before;
580 adjBeforeNodeArrayTarget[mu] =
before;
587 before = adjBeforeNodeArraySource[twinNT];
589 before = adjBeforeNodeArrayTarget[twinNT];
596 if (origNode == origEdge->
source())
599 before = newOrder[origNode].pushBack(origEdge->
adjSource());
601 before = newOrder[origNode].insertBefore(origEdge->
adjSource(),
before);
606 before = newOrder[origNode].pushBack(origEdge->
adjTarget());
608 before = newOrder[origNode].insertBefore(origEdge->
adjTarget(),
before);
619 const node& leftNode,
628 treeNodeTreated[mu] =
true;
630 switch(spqrTree.
typeOf(mu))
634 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
635 adjBeforeNodeArrayTarget, adjExternal);
639 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
640 adjBeforeNodeArrayTarget, adjExternal);
644 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
645 adjBeforeNodeArrayTarget, adjExternal, n);
658 const node& leftNode,
675 startAdjEntry = e->adjSource();
682 startAdjEntry = leftNode->
lastAdj();
684 startAdjEntry = leftNode->
firstAdj();
697 if (referenceEdge && leftNode == referenceEdge->
source())
698 before = adjBeforeNodeArraySource[mu];
699 else if (referenceEdge)
700 before = adjBeforeNodeArrayTarget[mu];
703 bool firstStep =
true;
704 while (firstStep || ae != startAdjEntry)
709 if (ae->
theEdge() == referenceEdge)
712 adjBeforeNodeArraySource[mu] = before;
714 adjBeforeNodeArrayTarget[mu] =
before;
718 m_leftNode, nodeLength, edgeLength, newOrder,
719 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
730 if (ae->
theEdge() == referenceEdge)
733 adjBeforeNodeArraySource[mu] = beforeSource;
735 adjBeforeNodeArrayTarget[mu] = beforeSource;
739 m_leftNode, nodeLength, edgeLength, newOrder,
740 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
757 const node& leftNode,
768 edge altReferenceEdge =
nullptr;
770 node m_leftNode = leftNode;
774 m_leftNode = *(nodeList.
begin());
784 altReferenceEdge = e;
796 edge longestEdge =
nullptr;
799 if (e == referenceEdge || e == altReferenceEdge)
801 if (!longestEdge || edgeLength[mu][e] > edgeLength[mu][longestEdge])
809 for (
int i = 0; i < 2; ++i) {
817 before = beforeAltRefEdge;
821 if (n == referenceEdge->
source())
822 before = adjBeforeNodeArraySource[mu];
824 before = adjBeforeNodeArrayTarget[mu];
833 if (longestEdge->
source() == n)
838 if (referenceEdge && S.
isVirtual(longestEdge))
841 if (longestEdge->
source() == n)
843 if (referenceEdge->
source() == n)
844 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArrayTarget[mu];
846 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArraySource[mu];
850 if (referenceEdge->
source() == n)
851 adjBeforeNodeArraySource[nu] = adjBeforeNodeArrayTarget[mu];
853 adjBeforeNodeArraySource[nu] = adjBeforeNodeArraySource[mu];
858 m_leftNode, nodeLength, edgeLength, newOrder,
859 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
867 for (
edge e : edgeList)
869 if (e == referenceEdge || e == longestEdge || e == altReferenceEdge || !S.
isVirtual(e))
873 if (referenceEdge !=
nullptr && e->
source() == n)
875 if (referenceEdge->
source() == n)
876 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArrayTarget[mu];
878 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArraySource[mu];
880 else if (referenceEdge) {
881 if (referenceEdge->
source() == n)
882 adjBeforeNodeArraySource[nu] = adjBeforeNodeArrayTarget[mu];
884 adjBeforeNodeArraySource[nu] = adjBeforeNodeArraySource[mu];
889 if (e->source() == n)
895 m_leftNode, nodeLength, edgeLength, newOrder,
896 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
901 for (
edge e : edgeList)
903 if (e == referenceEdge || e == longestEdge || e == altReferenceEdge || S.
isVirtual(e))
908 if (e->source() == n)
914 m_leftNode, nodeLength, edgeLength, newOrder,
915 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
921 for (
edge e : rightEdgeOrder)
923 if (e->source() == n)
929 m_leftNode, nodeLength, edgeLength, newOrder,
930 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
938 if (longestEdge->
source() == n)
944 m_leftNode, nodeLength, edgeLength, newOrder,
945 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
951 if (n == referenceEdge->
source())
952 adjBeforeNodeArraySource[mu] = before;
954 adjBeforeNodeArrayTarget[mu] =
before;
962 newLeftNode = m_leftNode;
964 if (altReferenceEdge->
source() == n)
970 newLeftNode, nodeLength, edgeLength, newOrder,
971 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
974 if (i == 0 && S.
isVirtual(altReferenceEdge))
977 if (altReferenceEdge->
source() == n)
978 beforeAltRefEdge = adjBeforeNodeArrayTarget[nu];
980 beforeAltRefEdge = adjBeforeNodeArraySource[nu];
992 const node& leftNode,
1005 face maxFaceContEdge =
nullptr;
1011 for(
face f : combinatorialEmbedding.faces)
1013 bool containsVirtualEdgeOrN =
false;
1014 adjEntry this_m_adjExternal =
nullptr;
1020 if ((n ==
nullptr && (ae->
theEdge() == referenceEdge || !referenceEdge))
1022 containsVirtualEdgeOrN =
true;
1024 this_m_adjExternal = ae;
1028 this_m_adjExternal = ae;
1030 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1034 if (containsVirtualEdgeOrN && this_m_adjExternal && sizeOfFace > bigFaceSize) {
1035 maxFaceNodes = faceNodes;
1036 bigFaceSize = sizeOfFace;
1037 maxFaceContEdge = f;
1038 m_adjExternal = this_m_adjExternal;
1055 if (referenceEdge) {
1057 adjEntry succ_virtualEdge_leftNode;
1058 if (leftNode == referenceEdge->
source())
1059 succ_virtualEdge_leftNode = referenceEdge->
adjSource()->
succ();
1061 succ_virtualEdge_leftNode = referenceEdge->
adjTarget()->
succ();
1062 if (!succ_virtualEdge_leftNode)
1063 succ_virtualEdge_leftNode = leftNode->
firstAdj();
1065 bool succVELNAEInExtFace =
false;
1068 if (aeExtFace->
theEdge() == succ_virtualEdge_leftNode->
theEdge())
1070 succVELNAEInExtFace =
true;
1075 if (!succVELNAEInExtFace)
1084 adjMaxFace = adjMaxFace->
twin();
1090 if (referenceEdge) {
1091 start_ae = adjMaxFace;
1094 if (start_ae->theEdge() == referenceEdge)
1096 start_ae = start_ae->faceCycleSucc();
1099 start_ae = start_ae->faceCycleSucc();
1100 }
while(start_ae != adjMaxFace);
1103 start_ae = adjMaxFace;
1109 bool firstStep =
true;
1110 bool after_start_ae =
true;
1112 firstStep || ae != start_ae;
1113 after_start_ae = after_start_ae && ae->succ(),
1114 ae = after_start_ae ? ae->faceCycleSucc()
1115 : (!ae->faceCycleSucc() ? adjMaxFace : ae->
faceCycleSucc()))
1121 nodeTreated[ae->theNode()] =
true;
1125 edge vE = (ae->theEdge() == referenceEdge) ? referenceEdge : ae->theEdge();
1126 node nu = (ae->theEdge() == referenceEdge) ? mu : S.
twinTreeNode(ae->theEdge());
1129 if (ae->theNode() == vE->
source())
1130 before = adjBeforeNodeArraySource[nu];
1132 before = adjBeforeNodeArrayTarget[nu];
1135 bool after_ae =
true;
1137 if (ae->theEdge() == referenceEdge)
1140 m_start_ae = ae->
succ();
1148 after_ae || aeN != m_start_ae;
1149 after_ae = after_ae && aeN->
succ(),
1150 aeN = after_ae ? aeN->
succ() : (!aeN->succ() ? ae->theNode()->firstAdj() : aeN->succ())
1153 node m_leftNode =
nullptr;
1154 if (S.
isVirtual(aeN->theEdge()) && aeN->theEdge() != referenceEdge)
1161 bool succInExtFace =
false;
1162 bool aeNInExtFace =
false;
1164 aeExtFace = adjMaxFace;
1169 succInExtFace =
true;
1173 if (aeExtFace->
theEdge() == aeN->theEdge())
1175 aeNInExtFace =
true;
1180 }
while(aeExtFace != adjMaxFace);
1181 if (aeNInExtFace && succInExtFace)
1182 m_leftNode = aeN->twinNode();
1184 m_leftNode = aeN->theNode();
1187 if (referenceEdge) {
1188 if (aeN->theEdge()->source() == aeN->theNode())
1190 if (aeN->theEdge()->target() == referenceEdge->
source())
1191 adjBeforeNodeArrayTarget[twinTN] = adjBeforeNodeArraySource[mu];
1192 else if (aeN->theEdge()->target() == referenceEdge->
target())
1193 adjBeforeNodeArrayTarget[twinTN] = adjBeforeNodeArrayTarget[mu];
1197 if (aeN->theEdge()->source() == referenceEdge->
source())
1198 adjBeforeNodeArraySource[twinTN] = adjBeforeNodeArraySource[mu];
1199 else if (aeN->theEdge()->source() == referenceEdge->
target())
1200 adjBeforeNodeArraySource[twinTN] = adjBeforeNodeArrayTarget[mu];
1206 m_leftNode, nodeLength, edgeLength, newOrder,
1207 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
1213 if (!maxFaceNodes.
search(aeN->twinNode()).valid())
1215 node orig_aeN_twin_theNode = S.
original(aeN->twinNode());
1216 buffer[aeN->theEdge()] = newOrder[orig_aeN_twin_theNode];
1217 newOrder[orig_aeN_twin_theNode].clear();
1230 nodeTreated[v] =
true;
1234 if (buffer[ae->theEdge()].empty())
1237 ae->theNode(), nodeLength, edgeLength, newOrder,
1238 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
1241 if (!nodeTreated[ae->twinNode()])
1243 node orig_ae_twin_theNode = S.
original(ae->twinNode());
1244 buffer[ae->theEdge()] = newOrder[orig_ae_twin_theNode];
1245 newOrder[orig_ae_twin_theNode].clear();
1250 buffer[ae->theEdge()].reverse();
1253 if (!before.
valid())
1254 before = newOrder[v_original].pushFront(*it);
1256 before = newOrder[v_original].insertBefore(*it, before);
1278 edgeLengthSkel.init(spqrTree->
tree());
1285 edgeLengthSkel[v][e] = 0;
1309 return edgeLength[e] + nodeLength[e->
source()]+ nodeLength[e->
target()];
1315 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1319 return computeSize(G, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1336 return edgeLength[e] + nodeLength[e->
source()]+ nodeLength[e->
target()];
1342 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1347 edgeLengthSkel.
init(spqrTree->
tree());
1354 edgeLengthSkel[v][e] = 0;
1370 if (sizeMu > biggestFace)
1371 biggestFace = sizeMu;
1390 return edgeLength[e] + nodeLength[e->
source()] + nodeLength[e->
target()];
1396 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1400 compute(G, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
1401 return computeSize(G, n, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
1414 compute(G, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1415 return computeSize(G, n, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1433 return edgeLength[e] + nodeLength[e->
source()] + nodeLength[e->
target()];
1439 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1447 bool alreadySeenMu =
false;
1448 for (
int j = 0; j < i && !alreadySeenMu; j++)
1450 if (mus[i] == mus[j])
1451 alreadySeenMu =
true;
1462 if (sizeInMu > biggestFace)
1463 biggestFace = sizeInMu;
1504 T ell = nodeLength[origRefEdgeSource] + nodeLength[origRefEdgeTarget];
1514 sizeOfFace += edgeLength[nu][eS];
1516 edgeLength[mu][e] = sizeOfFace - ell;
1521 edge longestEdge =
nullptr;
1525 && (!longestEdge || edgeLength[nu][ed] > edgeLength[nu][longestEdge])) {
1529 edgeLength[mu][e] = edgeLength[nu][longestEdge];
1538 T biggestFaceSize = -1;
1539 for(
face f : combinatorialEmbedding.faces)
1542 bool containsEr =
false;
1547 sizeOfFace += edgeLength[nu][ae->
theEdge()]
1551 if (containsEr && sizeOfFace > biggestFaceSize)
1552 biggestFaceSize = sizeOfFace;
1555 edgeLength[mu][e] = biggestFaceSize - ell;
1558 edgeLength[mu][e] = 1;
1589 L += edgeLength[mu][ed2];
1593 edgeLength[nu][referenceEdgeOfNu] =
1600 edge longestEdge =
nullptr;
1603 if (ed2 != eSnu && (!longestEdge || edgeLength[mu][ed2] > edgeLength[mu][longestEdge])) {
1607 edgeLength[nu][referenceEdgeOfNu] = edgeLength[mu][longestEdge];
1619 T biggestFaceSize = -1;
1620 for(
face f : combinatorialEmbedding.faces)
1623 bool containsESnu =
false;
1627 containsESnu =
true;
1628 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1631 if (containsESnu && sizeOfFace > biggestFaceSize)
1632 biggestFaceSize = sizeOfFace;
1634 edgeLength[nu][referenceEdgeOfNu] =
1635 biggestFaceSize - edgeLength[mu][eSnu]
1640 edgeLength[nu][referenceEdgeOfNu] = 0;
1656 bool containsARealEdge =
false;
1662 T biggestFaceSize = -1;
1663 for(
face f : combinatorialEmbedding.faces)
1666 bool containingN =
false;
1667 bool m_containsARealEdge =
false;
1673 m_containsARealEdge =
true;
1674 sizeOfFace += edgeLength[mu][ae->
theEdge()];
1677 if (containingN && sizeOfFace > biggestFaceSize)
1679 biggestFaceSize = sizeOfFace;
1680 containsARealEdge = m_containsARealEdge;
1684 if (!containsARealEdge)
1686 return biggestFaceSize;
1691 edge longestEdges[2] = {
nullptr,
nullptr};
1694 if (!longestEdges[1]
1695 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[1]]) {
1696 if (!longestEdges[0]
1697 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[0]]) {
1698 longestEdges[1] = longestEdges[0];
1699 longestEdges[0] = edgeWalker;
1702 longestEdges[1] = edgeWalker;
1709 containsARealEdge =
true;
1712 if (!containsARealEdge)
1715 return edgeLength[mu][longestEdges[0]] + edgeLength[mu][longestEdges[1]];
1727 containsARealEdge =
true;
1728 sizeOfFace += edgeLength[mu][eS];
1731 if (!containsARealEdge)
1749 bool containsARealEdge =
false;
1755 T biggestFaceSize = -1;
1756 for(
face f : combinatorialEmbedding.faces)
1758 bool m_containsARealEdge =
false;
1766 m_containsARealEdge =
true;
1767 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1771 if (sizeOfFace > biggestFaceSize)
1773 biggestFaceSize = sizeOfFace;
1774 containsARealEdge = m_containsARealEdge;
1778 if (!containsARealEdge)
1781 return biggestFaceSize;
1786 edge longestEdges[2] = {
nullptr,
nullptr};
1789 if (!longestEdges[1]
1790 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[1]]) {
1791 if (!longestEdges[0]
1792 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[0]]) {
1793 longestEdges[1] = longestEdges[0];
1794 longestEdges[0] = edgeWalker;
1797 longestEdges[1] = edgeWalker;
1804 containsARealEdge =
true;
1807 if (!containsARealEdge)
1810 return edgeLength[mu][longestEdges[0]] + edgeLength[mu][longestEdges[1]];
1822 containsARealEdge =
true;
1823 sizeOfFace += edgeLength[mu][eS];
1826 if (!containsARealEdge)
node target() const
Returns the target node of the edge.
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.
static void expandEdge(const StaticSPQRTree &spqrTree, NodeArray< bool > &treeNodeTreated, const node &mu, const node &leftNode, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength, NodeArray< List< adjEntry > > &newOrder, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArraySource, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArrayTarget, adjEntry &adjExternal, const node &n=nullptr)
static T largestFaceInSkeleton(const StaticSPQRTree &spqrTree, const node &mu, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength)
Computes the size of a maximum face in the skeleton graph of mu.
edge theEdge() const
Returns the edge associated with this adjacency entry.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Data type for general directed graphs (adjacency list representation).
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
void sort(node v, const ADJ_ENTRY_LIST &newOrder)
Sorts the adjacency list of node v according to newOrder.
void init()
Reinitializes the array. Associates the array with no graph.
static void compute(const Graph &G, const NodeArray< T > &nodeLength, const EdgeArray< T > &edgeLength, StaticSPQRTree *spqrTree, NodeArray< EdgeArray< T > > &edgeLengthSkel)
Computes the component lengths of all virtual edges in spqrTree.
const Graph & getGraph() const
Returns a reference to the skeleton graph M.
int degree() const
Returns the degree of the node (indegree + outdegree).
const Skeleton & skeletonOfReal(edge e) const override
Returns the skeleton that contains the real edge e.
iterator begin()
Returns an iterator to the first element of the list.
adjEntry firstAdj() const
Returns the first adjacency element in the face.
static void expandEdgeSNode(const StaticSPQRTree &spqrTree, NodeArray< bool > &treeNodeTreated, const node &mu, const node &leftNode, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength, NodeArray< List< adjEntry > > &newOrder, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArraySource, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArrayTarget, adjEntry &adjExternal)
virtual node original(node v) const =0
Returns the vertex in the original graph G that corresponds to v.
node rootTreeAt(edge e) override
Roots T at edge e and returns the new root node of T.
static T computeSize(const Graph &G, const node &n, const NodeArray< T > &nodeLength, const EdgeArray< T > &edgeLength)
Returns the size of a maximum external face in G containing the node n.
Declaration of CombinatorialEmbedding and face.
EmbedderMaxFaceBiconnectedGraphs()
Creates an embedder.
Dynamic arrays indexed with edges.
edge referenceEdge() const
Returns the reference edge of S in M.
Skeleton graphs of nodes in an SPQR-tree.
adjEntry faceCycleSucc() const
Returns the cyclic successor in face.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
int numberOfEdges() const
Returns the number of edges in the graph.
static T largestFaceContainingNode(const StaticSPQRTree &spqrTree, const node &mu, const node &n, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength)
Computes the size of a maximum face in the skeleton graph of mu containing n.
Dynamic arrays indexed with nodes.
bool planarEmbed(Graph &G)
Returns true, if G is planar, false otherwise. If true is returned, G will be planarly embedded...
static void adjEntryForNode(adjEntry &ae, ListIterator< adjEntry > &before, const StaticSPQRTree &spqrTree, NodeArray< bool > &treeNodeTreated, const node &mu, const node &leftNode, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength, NodeArray< List< adjEntry > > &newOrder, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArraySource, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArrayTarget, adjEntry &adjExternal)
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
NodeType typeOf(node v) const override
Returns the type of node v.
Declaration of class StaticSPQRTree.
static void embed(Graph &G, adjEntry &adjExternal, const NodeArray< T > &nodeLength, const EdgeArray< T > &edgeLength, const node &n=nullptr)
Embeds G by computing and extending a maximum face in G containing n.
edge firstEdge() const
Returns the first edge in the list of all edges.
Doubly linked lists (maintaining the length of the list).
internal::FaceAdjContainer entries
Container maintaining the adjacency entries in the face.
Faces in a combinatorial embedding.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
static void bottomUpTraversal(StaticSPQRTree &spqrTree, const node &mu, const NodeArray< T > &nodeLength, NodeArray< EdgeArray< T > > &edgeLength)
Bottom up traversal of SPQR-tree computing the component length of all non-reference edges...
Class for the representation of edges.
void allEdges(EDGELIST &edgeList) const
Returns a list with all edges of the graph.
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
adjEntry lastAdj() const
Returns the last entry in the adjacency list.
Class for the representation of nodes.
Encapsulates a pointer to a list element.
static void expandEdgeRNode(const StaticSPQRTree &spqrTree, NodeArray< bool > &treeNodeTreated, const node &mu, const node &leftNode, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength, NodeArray< List< adjEntry > > &newOrder, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArraySource, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArrayTarget, adjEntry &adjExternal, const node &n)
virtual edge twinEdge(edge e) const =0
Returns the twin edge of skeleton edge e.
Skeleton & skeleton(node v) const override
Returns the skeleton of node v.
node treeNode() const
Returns the corresponding node in the owner tree T to which S belongs.
static void expandEdgePNode(const StaticSPQRTree &spqrTree, NodeArray< bool > &treeNodeTreated, const node &mu, const node &leftNode, const NodeArray< T > &nodeLength, const NodeArray< EdgeArray< T > > &edgeLength, NodeArray< List< adjEntry > > &newOrder, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArraySource, NodeArray< ListIterator< adjEntry > > &adjBeforeNodeArrayTarget, adjEntry &adjExternal)
static void topDownTraversal(StaticSPQRTree &spqrTree, const node &mu, const NodeArray< T > &nodeLength, NodeArray< EdgeArray< T > > &edgeLength)
Top down traversal of SPQR-tree computing the component length of all reference edges.
Linear-time implementation of static SPQR-trees.
edge succ() const
Returns the successor in the list of all edges.
adjEntry succ() const
Returns the successor in the adjacency list.
void allNodes(NODELIST &nodeList) const
Returns a list with all nodes of the graph.
node rootNode() const override
Returns the root node of T.
node source() const
Returns the source node of the edge.
Computes an embedding of a biconnected graph with maximum external face.
The namespace for all OGDF objects.
Declaration of extended graph algorithms.
int numberOfNodes() const
Returns the number of nodes in the graph.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
Combinatorial embeddings of planar graphs with modification functionality.
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...
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
bool valid() const
Returns true iff the iterator points to an element.
node theNode() const
Returns the node whose adjacency list contains this element.
Class for adjacency list elements.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
const Graph & tree() const override
Returns a reference to the tree T.
virtual bool isVirtual(edge e) const =0
Returns true iff e is a virtual edge.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.