67 const node& n =
nullptr);
267 const node& leftNode,
274 const node& n =
nullptr);
304 const node& leftNode,
340 const node& leftNode,
379 const node& leftNode,
420 const node& leftNode,
450 compute(G, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
461 if (sizeMu > biggestFace)
463 biggestFace = sizeMu;
475 bool alreadySeenMu =
false;
476 for (
int j = 0; j < i && !alreadySeenMu; j++)
478 if (mus[i] == mus[j])
479 alreadySeenMu =
true;
491 nodeLength, edgeLengthSkel);
492 if (sizeInMu > biggestFace)
494 biggestFace = sizeInMu;
509 adjExternal =
nullptr;
512 expandEdge(spqrTree, treeNodeTreated, bigFaceMu,
nullptr, nodeLength,
513 edgeLengthSkel, newOrder, adjBeforeNodeArraySource,
514 adjBeforeNodeArrayTarget, adjExternal, n);
517 G.
sort(v, newOrder[v]);
528 const node& leftNode,
546 if (!treeNodeTreated[twinNT])
550 m_leftNode = twinE->
source();
552 m_leftNode = twinE->
target();
555 adjBeforeNodeArraySource[twinNT] = before;
557 adjBeforeNodeArrayTarget[twinNT] =
before;
560 expandEdge(spqrTree, treeNodeTreated, twinNT, m_leftNode,
561 nodeLength, edgeLength, newOrder,
562 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
566 if (ae->
theEdge() == referenceEdge)
571 adjBeforeNodeArraySource[mu] =
before;
577 adjBeforeNodeArrayTarget[mu] =
before;
584 before = adjBeforeNodeArraySource[twinNT];
586 before = adjBeforeNodeArrayTarget[twinNT];
593 if (origNode == origEdge->
source())
596 before = newOrder[origNode].pushBack(origEdge->
adjSource());
598 before = newOrder[origNode].insertBefore(origEdge->
adjSource(),
before);
603 before = newOrder[origNode].pushBack(origEdge->
adjTarget());
605 before = newOrder[origNode].insertBefore(origEdge->
adjTarget(),
before);
616 const node& leftNode,
625 treeNodeTreated[mu] =
true;
627 switch(spqrTree.
typeOf(mu))
631 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
632 adjBeforeNodeArrayTarget, adjExternal);
636 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
637 adjBeforeNodeArrayTarget, adjExternal);
641 nodeLength, edgeLength, newOrder, adjBeforeNodeArraySource,
642 adjBeforeNodeArrayTarget, adjExternal, n);
655 const node& leftNode,
672 startAdjEntry = e->adjSource();
679 startAdjEntry = leftNode->
lastAdj();
681 startAdjEntry = leftNode->
firstAdj();
694 if (referenceEdge && leftNode == referenceEdge->
source())
695 before = adjBeforeNodeArraySource[mu];
696 else if (referenceEdge)
697 before = adjBeforeNodeArrayTarget[mu];
700 bool firstStep =
true;
701 while (firstStep || ae != startAdjEntry)
706 if (ae->
theEdge() == referenceEdge)
709 adjBeforeNodeArraySource[mu] = before;
711 adjBeforeNodeArrayTarget[mu] =
before;
715 m_leftNode, nodeLength, edgeLength, newOrder,
716 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
727 if (ae->
theEdge() == referenceEdge)
730 adjBeforeNodeArraySource[mu] = beforeSource;
732 adjBeforeNodeArrayTarget[mu] = beforeSource;
736 m_leftNode, nodeLength, edgeLength, newOrder,
737 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
754 const node& leftNode,
765 edge altReferenceEdge =
nullptr;
767 node m_leftNode = leftNode;
771 m_leftNode = *(nodeList.
begin());
781 altReferenceEdge = e;
793 edge longestEdge =
nullptr;
796 if (e == referenceEdge || e == altReferenceEdge)
798 if (!longestEdge || edgeLength[mu][e] > edgeLength[mu][longestEdge])
806 for (
int i = 0; i < 2; ++i) {
814 before = beforeAltRefEdge;
818 if (n == referenceEdge->
source())
819 before = adjBeforeNodeArraySource[mu];
821 before = adjBeforeNodeArrayTarget[mu];
830 if (longestEdge->
source() == n)
835 if (referenceEdge && S.
isVirtual(longestEdge))
838 if (longestEdge->
source() == n)
840 if (referenceEdge->
source() == n)
841 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArrayTarget[mu];
843 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArraySource[mu];
847 if (referenceEdge->
source() == n)
848 adjBeforeNodeArraySource[nu] = adjBeforeNodeArrayTarget[mu];
850 adjBeforeNodeArraySource[nu] = adjBeforeNodeArraySource[mu];
855 m_leftNode, nodeLength, edgeLength, newOrder,
856 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
864 for (
edge e : edgeList)
866 if (e == referenceEdge || e == longestEdge || e == altReferenceEdge || !S.
isVirtual(e))
870 if (referenceEdge !=
nullptr && e->
source() == n)
872 if (referenceEdge->
source() == n)
873 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArrayTarget[mu];
875 adjBeforeNodeArrayTarget[nu] = adjBeforeNodeArraySource[mu];
877 else if (referenceEdge) {
878 if (referenceEdge->
source() == n)
879 adjBeforeNodeArraySource[nu] = adjBeforeNodeArrayTarget[mu];
881 adjBeforeNodeArraySource[nu] = adjBeforeNodeArraySource[mu];
886 if (e->source() == n)
892 m_leftNode, nodeLength, edgeLength, newOrder,
893 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
898 for (
edge e : edgeList)
900 if (e == referenceEdge || e == longestEdge || e == altReferenceEdge || S.
isVirtual(e))
905 if (e->source() == n)
911 m_leftNode, nodeLength, edgeLength, newOrder,
912 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
918 for (
edge e : rightEdgeOrder)
920 if (e->source() == n)
926 m_leftNode, nodeLength, edgeLength, newOrder,
927 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
935 if (longestEdge->
source() == n)
941 m_leftNode, nodeLength, edgeLength, newOrder,
942 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
948 if (n == referenceEdge->
source())
949 adjBeforeNodeArraySource[mu] = before;
951 adjBeforeNodeArrayTarget[mu] =
before;
959 newLeftNode = m_leftNode;
961 if (altReferenceEdge->
source() == n)
967 newLeftNode, nodeLength, edgeLength, newOrder,
968 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
971 if (i == 0 && S.
isVirtual(altReferenceEdge))
974 if (altReferenceEdge->
source() == n)
975 beforeAltRefEdge = adjBeforeNodeArrayTarget[nu];
977 beforeAltRefEdge = adjBeforeNodeArraySource[nu];
989 const node& leftNode,
1002 face maxFaceContEdge =
nullptr;
1008 for(
face f : combinatorialEmbedding.faces)
1010 bool containsVirtualEdgeOrN =
false;
1011 adjEntry this_m_adjExternal =
nullptr;
1017 if ((n ==
nullptr && (ae->
theEdge() == referenceEdge || !referenceEdge))
1019 containsVirtualEdgeOrN =
true;
1021 this_m_adjExternal = ae;
1025 this_m_adjExternal = ae;
1027 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1031 if (containsVirtualEdgeOrN && this_m_adjExternal && sizeOfFace > bigFaceSize) {
1032 maxFaceNodes = faceNodes;
1033 bigFaceSize = sizeOfFace;
1034 maxFaceContEdge = f;
1035 m_adjExternal = this_m_adjExternal;
1052 if (referenceEdge) {
1054 adjEntry succ_virtualEdge_leftNode;
1055 if (leftNode == referenceEdge->
source())
1056 succ_virtualEdge_leftNode = referenceEdge->
adjSource()->
succ();
1058 succ_virtualEdge_leftNode = referenceEdge->
adjTarget()->
succ();
1059 if (!succ_virtualEdge_leftNode)
1060 succ_virtualEdge_leftNode = leftNode->
firstAdj();
1062 bool succVELNAEInExtFace =
false;
1065 if (aeExtFace->
theEdge() == succ_virtualEdge_leftNode->
theEdge())
1067 succVELNAEInExtFace =
true;
1072 if (!succVELNAEInExtFace)
1081 adjMaxFace = adjMaxFace->
twin();
1087 if (referenceEdge) {
1088 start_ae = adjMaxFace;
1091 if (start_ae->theEdge() == referenceEdge)
1093 start_ae = start_ae->faceCycleSucc();
1096 start_ae = start_ae->faceCycleSucc();
1097 }
while(start_ae != adjMaxFace);
1100 start_ae = adjMaxFace;
1106 bool firstStep =
true;
1107 bool after_start_ae =
true;
1109 firstStep || ae != start_ae;
1110 after_start_ae = after_start_ae && ae->succ(),
1111 ae = after_start_ae ? ae->faceCycleSucc()
1112 : (!ae->faceCycleSucc() ? adjMaxFace : ae->
faceCycleSucc()))
1118 nodeTreated[ae->theNode()] =
true;
1122 edge vE = (ae->theEdge() == referenceEdge) ? referenceEdge : ae->theEdge();
1123 node nu = (ae->theEdge() == referenceEdge) ? mu : S.
twinTreeNode(ae->theEdge());
1126 if (ae->theNode() == vE->
source())
1127 before = adjBeforeNodeArraySource[nu];
1129 before = adjBeforeNodeArrayTarget[nu];
1132 bool after_ae =
true;
1134 if (ae->theEdge() == referenceEdge)
1137 m_start_ae = ae->
succ();
1145 after_ae || aeN != m_start_ae;
1146 after_ae = after_ae && aeN->
succ(),
1147 aeN = after_ae ? aeN->
succ() : (!aeN->succ() ? ae->theNode()->firstAdj() : aeN->succ())
1150 node m_leftNode =
nullptr;
1151 if (S.
isVirtual(aeN->theEdge()) && aeN->theEdge() != referenceEdge)
1158 bool succInExtFace =
false;
1159 bool aeNInExtFace =
false;
1161 aeExtFace = adjMaxFace;
1166 succInExtFace =
true;
1170 if (aeExtFace->
theEdge() == aeN->theEdge())
1172 aeNInExtFace =
true;
1177 }
while(aeExtFace != adjMaxFace);
1178 if (aeNInExtFace && succInExtFace)
1179 m_leftNode = aeN->twinNode();
1181 m_leftNode = aeN->theNode();
1184 if (referenceEdge) {
1185 if (aeN->theEdge()->source() == aeN->theNode())
1187 if (aeN->theEdge()->target() == referenceEdge->
source())
1188 adjBeforeNodeArrayTarget[twinTN] = adjBeforeNodeArraySource[mu];
1189 else if (aeN->theEdge()->target() == referenceEdge->
target())
1190 adjBeforeNodeArrayTarget[twinTN] = adjBeforeNodeArrayTarget[mu];
1194 if (aeN->theEdge()->source() == referenceEdge->
source())
1195 adjBeforeNodeArraySource[twinTN] = adjBeforeNodeArraySource[mu];
1196 else if (aeN->theEdge()->source() == referenceEdge->
target())
1197 adjBeforeNodeArraySource[twinTN] = adjBeforeNodeArrayTarget[mu];
1203 m_leftNode, nodeLength, edgeLength, newOrder,
1204 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
1210 if (!maxFaceNodes.
search(aeN->twinNode()).valid())
1212 node orig_aeN_twin_theNode = S.
original(aeN->twinNode());
1213 buffer[aeN->theEdge()] = newOrder[orig_aeN_twin_theNode];
1214 newOrder[orig_aeN_twin_theNode].clear();
1227 nodeTreated[v] =
true;
1231 if (buffer[ae->theEdge()].empty())
1234 ae->theNode(), nodeLength, edgeLength, newOrder,
1235 adjBeforeNodeArraySource, adjBeforeNodeArrayTarget,
1238 if (!nodeTreated[ae->twinNode()])
1240 node orig_ae_twin_theNode = S.
original(ae->twinNode());
1241 buffer[ae->theEdge()] = newOrder[orig_ae_twin_theNode];
1242 newOrder[orig_ae_twin_theNode].clear();
1247 buffer[ae->theEdge()].reverse();
1250 if (!before.
valid())
1251 before = newOrder[v_original].pushFront(*it);
1253 before = newOrder[v_original].insertBefore(*it, before);
1275 edgeLengthSkel.init(spqrTree->
tree());
1282 edgeLengthSkel[v][e] = 0;
1306 return edgeLength[e] + nodeLength[e->
source()]+ nodeLength[e->
target()];
1312 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1316 return computeSize(G, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1333 return edgeLength[e] + nodeLength[e->
source()]+ nodeLength[e->
target()];
1339 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1344 edgeLengthSkel.
init(spqrTree->
tree());
1351 edgeLengthSkel[v][e] = 0;
1367 if (sizeMu > biggestFace)
1368 biggestFace = sizeMu;
1387 return edgeLength[e] + nodeLength[e->
source()] + nodeLength[e->
target()];
1393 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1397 compute(G, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
1398 return computeSize(G, n, nodeLength, edgeLength, &spqrTree, edgeLengthSkel);
1411 compute(G, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1412 return computeSize(G, n, nodeLength, edgeLength, spqrTree, edgeLengthSkel);
1430 return edgeLength[e] + nodeLength[e->
source()] + nodeLength[e->
target()];
1436 return edgeLength[e1] + edgeLength[e2] + nodeLength[e1->
source()] + nodeLength[e1->
target()];
1444 bool alreadySeenMu =
false;
1445 for (
int j = 0; j < i && !alreadySeenMu; j++)
1447 if (mus[i] == mus[j])
1448 alreadySeenMu =
true;
1459 if (sizeInMu > biggestFace)
1460 biggestFace = sizeInMu;
1501 T ell = nodeLength[origRefEdgeSource] + nodeLength[origRefEdgeTarget];
1511 sizeOfFace += edgeLength[nu][eS];
1513 edgeLength[mu][e] = sizeOfFace - ell;
1518 edge longestEdge =
nullptr;
1522 && (!longestEdge || edgeLength[nu][ed] > edgeLength[nu][longestEdge])) {
1526 edgeLength[mu][e] = edgeLength[nu][longestEdge];
1535 T biggestFaceSize = -1;
1536 for(
face f : combinatorialEmbedding.faces)
1539 bool containsEr =
false;
1544 sizeOfFace += edgeLength[nu][ae->
theEdge()]
1548 if (containsEr && sizeOfFace > biggestFaceSize)
1549 biggestFaceSize = sizeOfFace;
1552 edgeLength[mu][e] = biggestFaceSize - ell;
1555 edgeLength[mu][e] = 1;
1586 L += edgeLength[mu][ed2];
1590 edgeLength[nu][referenceEdgeOfNu] =
1597 edge longestEdge =
nullptr;
1600 if (ed2 != eSnu && (!longestEdge || edgeLength[mu][ed2] > edgeLength[mu][longestEdge])) {
1604 edgeLength[nu][referenceEdgeOfNu] = edgeLength[mu][longestEdge];
1616 T biggestFaceSize = -1;
1617 for(
face f : combinatorialEmbedding.faces)
1620 bool containsESnu =
false;
1624 containsESnu =
true;
1625 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1628 if (containsESnu && sizeOfFace > biggestFaceSize)
1629 biggestFaceSize = sizeOfFace;
1631 edgeLength[nu][referenceEdgeOfNu] =
1632 biggestFaceSize - edgeLength[mu][eSnu]
1637 edgeLength[nu][referenceEdgeOfNu] = 0;
1653 bool containsARealEdge =
false;
1659 T biggestFaceSize = -1;
1660 for(
face f : combinatorialEmbedding.faces)
1663 bool containingN =
false;
1664 bool m_containsARealEdge =
false;
1670 m_containsARealEdge =
true;
1671 sizeOfFace += edgeLength[mu][ae->
theEdge()];
1674 if (containingN && sizeOfFace > biggestFaceSize)
1676 biggestFaceSize = sizeOfFace;
1677 containsARealEdge = m_containsARealEdge;
1681 if (!containsARealEdge)
1683 return biggestFaceSize;
1688 edge longestEdges[2] = {
nullptr,
nullptr};
1691 if (!longestEdges[1]
1692 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[1]]) {
1693 if (!longestEdges[0]
1694 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[0]]) {
1695 longestEdges[1] = longestEdges[0];
1696 longestEdges[0] = edgeWalker;
1699 longestEdges[1] = edgeWalker;
1706 containsARealEdge =
true;
1709 if (!containsARealEdge)
1712 return edgeLength[mu][longestEdges[0]] + edgeLength[mu][longestEdges[1]];
1724 containsARealEdge =
true;
1725 sizeOfFace += edgeLength[mu][eS];
1728 if (!containsARealEdge)
1746 bool containsARealEdge =
false;
1752 T biggestFaceSize = -1;
1753 for(
face f : combinatorialEmbedding.faces)
1755 bool m_containsARealEdge =
false;
1763 m_containsARealEdge =
true;
1764 sizeOfFace += edgeLength[mu][ae->
theEdge()]
1768 if (sizeOfFace > biggestFaceSize)
1770 biggestFaceSize = sizeOfFace;
1771 containsARealEdge = m_containsARealEdge;
1775 if (!containsARealEdge)
1778 return biggestFaceSize;
1783 edge longestEdges[2] = {
nullptr,
nullptr};
1786 if (!longestEdges[1]
1787 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[1]]) {
1788 if (!longestEdges[0]
1789 || edgeLength[mu][edgeWalker] > edgeLength[mu][longestEdges[0]]) {
1790 longestEdges[1] = longestEdges[0];
1791 longestEdges[0] = edgeWalker;
1794 longestEdges[1] = edgeWalker;
1801 containsARealEdge =
true;
1804 if (!containsARealEdge)
1807 return edgeLength[mu][longestEdges[0]] + edgeLength[mu][longestEdges[1]];
1819 containsARealEdge =
true;
1820 sizeOfFace += edgeLength[mu][eS];
1823 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.
Dynamic arrays indexed with edges.
edge referenceEdge() const
Returns the reference edge of S in M.
Skeleton graphs of nodes in an SPQR-tree.
bool valid() const
Returns true iff the iterator points to an element.
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.
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.
node rootNode() const override
Returns the root node of T.
void allNodes(CONTAINER &nodeContainer) const
Returns a container with all nodes of the graph.
node source() const
Returns the source node of the edge.
Embedder that maximizing the external face.
The namespace for all OGDF objects.
Declaration of extended graph algorithms.
void allEdges(CONTAINER &edgeContainer) const
Returns a container with all edges of the graph.
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.
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.