85 int costGen = 1,
int costAssoc = 1,
bool align =
false);
124 int costGen = 1,
int costAssoc = 1,
bool align =
false)
231 ATYPE d = (*m_pPos)[x] - (*m_pPos)[y];
237 return (*
m_pSec)[x] - (*m_pSec)[y];
331 if ((m_pOR->direction(adj) == m_arcDir || m_pOR->direction(adj) == m_oppArcDir)
334 m_length[m_edgeToBasicArc[adj]] = 0;
339 }
while (adj != adjFirst);
345 && (m_pOR->direction(adjFirst) == m_arcDir || m_pOR->direction(adjFirst) == m_oppArcDir)) {
346 int numIncoming = faceSize - 3;
347 int median = (numIncoming / 2) + 1;
356 if (m_pOR->direction(adjFirst) == m_arcDir) {
363 for (
int i = 0; i < median; i++) {
368 node vCenter = newNode();
369 setExtra(vCenter, vMin, 0);
374 edge helper = newEdge(m_pathNode[vMin], vCenter);
375 m_length[helper] = 0;
380 edge e1 = newEdge(vCenter, upper);
382 m_cost[e1] = m_MedianArcCost;
385 edge e2 = newEdge(vCenter, lower);
387 m_cost[e2] = m_MedianArcCost;
397 for (adj = cornerDir; m_pOR->direction(adj) == m_arcDir; adj = adj->
faceCycleSucc())
398 m_cost[m_edgeToBasicArc[adj]] = 0;
399 for (adj = cornerOppDir; m_pOR->direction(adj) == m_oppArcDir; adj = adj->
faceCycleSucc())
400 m_cost[m_edgeToBasicArc[adj]] = 0;
404 for (adj = cornerDir; m_pOR->direction(adj) == m_arcDir; adj = adj->
faceCycleSucc()) {
405 m_cost[m_edgeToBasicArc[adj]] = 0;
413 for (adj = cornerOppDir; m_pOR->direction(adj) == m_oppArcDir; adj = adj->
faceCycleSucc()) {
414 m_cost[m_edgeToBasicArc[adj]] = 0;
436 const ATYPE overhang = rc.
overhang();
444 resetGenMergerLengths(PG, PG.
expandAdj(v));
448 ATYPE size = sizeOrig[v];
453 ATYPE rcMin = overhang + rc(v, dirMin);
454 ATYPE rcMax = overhang + rc(v, dirMax);
462 setBoundaryCosts(cornerDir, cornerOppDir);
469 m_length[m_edgeToBasicArc[cornerDir]] = rcMin;
470 m_length[m_edgeToBasicArc[cornerMax->
faceCyclePred()]] = rcMax;
473 m_length[m_edgeToBasicArc[cornerDir]] = 0;
474 delEdge(m_edgeToBasicArc[cornerDir]);
478 m_length[m_edgeToBasicArc[cornerOppDir]] = rcMax;
479 m_length[m_edgeToBasicArc[cornerMin->
faceCyclePred()]] = rcMin;
482 m_length[m_edgeToBasicArc[cornerOppDir]] = 0;
483 delEdge(m_edgeToBasicArc[cornerOppDir]);
494 edge e = newEdge(vMin, vMax);
495 m_length[e] = rcMin + size + rcMax - 2 * overhang;
496 m_cost[e] = 2 * m_vertexArcCost;
501 ATYPE minHalf = size / 2;
502 ATYPE maxHalf = size - minHalf;
503 ATYPE lenMin = rcMin + minHalf - overhang;
504 ATYPE lenMax = maxHalf + rcMax - overhang;
508 edge e1 = newEdge(vMin, vCenter);
509 m_length[e1] = lenMin;
510 m_cost[e1] = m_vertexArcCost;
512 edge e2 = newEdge(vCenter, vMax);
513 m_length[e2] = lenMax;
514 m_cost[e2] = m_vertexArcCost;
520 edge e1 = newEdge(vMin, vCenter);
521 m_length[e1] = lenMin;
522 m_cost[e1] = m_vertexArcCost;
524 edge e2 = newEdge(vCenter, vMax);
525 m_length[e2] = lenMax;
526 m_cost[e2] = m_vertexArcCost;
537 edge arc = m_edgeToBasicArc[e];
538 if (arc ==
nullptr) {
542 node v = e->source();
543 node w = e->target();
546 && (m_pOR->angle(e->adjSource()) == m_pOR->angle(e->adjTarget())) &&
551 m_cost[arc] = m_doubleBendCost;
565 setBasicArcsZeroLength(PG);
579 resetGenMergerLengths(PG, PG.
expandAdj(v));
583 ATYPE size = sizeOrig[v];
593 m_length[m_edgeToBasicArc[adj]] = minDist.
epsilon(v, m_arcDir, 0);
594 m_length[m_edgeToBasicArc[last]] = minDist.
epsilon(v, m_arcDir, 1);
600 m_length[m_edgeToBasicArc[adj]] = minDist.
delta(v, m_arcDir, i);
606 m_length[m_edgeToBasicArc[adj]] = minDist.
epsilon(v, m_oppArcDir, 0);
607 m_length[m_edgeToBasicArc[last]] = minDist.
epsilon(v, m_oppArcDir, 1);
613 m_length[m_edgeToBasicArc[adj]] = minDist.
delta(v, m_oppArcDir, i);
632 ATYPE lenMin = size / 2;
633 ATYPE lenMax = size - lenMin;
634 node vCenter = newNode();
635 setExtra(vCenter, cornerDir->
theNode(), lenMin);
637 edge e1 = newEdge(vMin, vCenter);
638 m_length[e1] = lenMin;
639 m_cost[e1] = m_vertexArcCost;
641 edge e2 = newEdge(vCenter, vMax);
642 m_length[e2] = lenMax;
643 m_cost[e2] = m_vertexArcCost;
649 node vBungee = newNode();
651 setExtra(vBungee, cornerDir->
theNode(), minDist.
epsilon(v, m_arcDir, 0));
653 edge eToBungee = newEdge(vMin, vBungee);
656 m_cost[eToBungee] = 0;
657 m_length[eToBungee] = minDist.
epsilon(v, m_arcDir, 0);
659 edge eBungeeCenter = newEdge(vBungee, vCenter);
662 m_cost[eBungeeCenter] = m_bungeeCost;
663 m_length[eBungeeCenter] = 0;
666 edge eBungeeOut = newEdge(vBungee, m_pathNode[cornerDir->
twinNode()]);
669 m_cost[eBungeeOut] = m_bungeeCost;
670 m_length[eBungeeOut] = 0;
673 edge eFromOut = newEdge(m_pathNode[cornerDir->
twinNode()], vMax);
675 m_cost[eFromOut] = 0;
676 m_length[eFromOut] = minDist.
epsilon(v,m_arcDir,1);
682 node vBungee = newNode();
684 setExtra(vBungee, cornerDir->
theNode(), minDist.
epsilon(v, m_oppArcDir, 0));
686 edge eToBungee = newEdge(vMin, vBungee);
689 m_cost[eToBungee] = 0;
690 m_length[eToBungee] = minDist.
epsilon(v, m_oppArcDir, 0);
692 edge eBungeeCenter = newEdge(vBungee, vCenter);
695 m_cost[eBungeeCenter] = m_bungeeCost;
696 m_length[eBungeeCenter] = 0;
699 edge eBungeeOut = newEdge(vBungee, m_pathNode[cornerOppDir->
twinNode()]);
702 m_cost[eBungeeOut] = m_bungeeCost;
703 m_length[eBungeeOut] = 0;
706 edge eFromOut = newEdge(m_pathNode[cornerOppDir->
twinNode()], vMax);
708 m_cost[eFromOut] = 0;
709 m_length[eFromOut] = minDist.
epsilon(v,m_oppArcDir,0);
714 edge e = newEdge(vMin, vMax);
716 m_cost[e] = 2 * m_vertexArcCost;
721 ATYPE lenMin = size / 2;
722 ATYPE lenMax = size - lenMin;
730 edge e1 = newEdge(vMin, vCenter);
731 m_length[e1] = lenMin;
732 m_cost[e1] = m_vertexArcCost;
734 edge e2 = newEdge(vCenter, vMax);
735 m_length[e2] = lenMax;
736 m_cost[e2] = m_vertexArcCost;
740 node vCenter = newNode();
742 setExtra(vCenter, cornerDir->
theNode(), lenMin);
744 edge e1 = newEdge(vMin, vCenter);
745 m_length[e1] = lenMin;
746 m_cost[e1] = m_vertexArcCost;
748 edge e2 = newEdge(vCenter, vMax);
749 m_length[e2] = lenMax;
750 m_cost[e2] = m_vertexArcCost;
755 node vBungee = newNode();
757 setExtra(vBungee, cornerDir->
theNode(), minDist.
epsilon(v, m_arcDir, 0));
759 edge eToBungee = newEdge(vMin, vBungee);
762 m_cost[eToBungee] = 0;
763 m_length[eToBungee] = minDist.
epsilon(v, m_arcDir, 0);
765 edge eBungeeCenter = newEdge(vBungee, vCenter);
768 m_cost[eBungeeCenter] = m_bungeeCost;
769 m_length[eBungeeCenter] = 0;
772 edge eBungeeOut = newEdge(vBungee, m_pathNode[cornerDir->
twinNode()]);
775 m_cost[eBungeeOut] = m_bungeeCost;
776 m_length[eBungeeOut] = 0;
781 edge e1 = newEdge(vMin, vCenter);
782 m_length[e1] = lenMin;
783 m_cost[e1] = m_vertexArcCost;
785 edge e2 = newEdge(vCenter, vMax);
786 m_length[e2] = lenMax;
787 m_cost[e2] = m_vertexArcCost;
792 node vCenter = newNode();
794 setExtra(vCenter, cornerDir->
theNode(), lenMin);
796 edge e1 = newEdge(vMin, vCenter);
797 m_length[e1] = lenMin;
798 m_cost[e1] = m_vertexArcCost;
800 edge e2 = newEdge(vCenter, vMax);
801 m_length[e2] = lenMax;
802 m_cost[e2] = m_vertexArcCost;
806 node vBungee = newNode();
808 setExtra(vBungee, cornerDir->
theNode(), minDist.
epsilon(v, m_oppArcDir, 0));
810 edge eToBungee = newEdge(vMin, vBungee);
813 m_cost[eToBungee] = 0;
814 m_length[eToBungee] = minDist.
epsilon(v, m_oppArcDir, 0);
816 edge eBungeeCenter = newEdge(vBungee, vCenter);
819 m_cost[eBungeeCenter] = m_bungeeCost;
820 m_length[eBungeeCenter] = 0;
823 edge eBungeeOut = newEdge(vBungee, m_pathNode[cornerOppDir->
twinNode()]);
826 m_cost[eBungeeOut] = m_bungeeCost;
827 m_length[eBungeeOut] = 0;
833 setBoundaryCosts(cornerDir, cornerOppDir);
838 writeGML(
"eastvertexsizeinserted.gml");
840 writeGML(
"northvertexsizeinserted.gml");
850 for (
edge e : edges) {
851 c += cost(e) * (pos[e->target()] - pos[e->source()]);
863 if (sweepLine.
empty()) {
869 if ((*it).m_high < (*it).m_low) {
873 ATYPE x = (*it).m_low;
875 for (++it; it.
valid(); ++it) {
876 if ((*it).m_high < (*it).m_low) {
879 if ((*it).m_high > x) {
898 for (
int d = 0; d < 4; ++d) {
904 insertVisibilityArcs(PG, posDir, posOrthDir, minDist);
938 for (
node v : nodes) {
940 if (m_path[v].empty()) {
946 segPos[v] = posDir[*it];
947 low[v] = high[v] = posOrthDir[*it];
949 for (++it; it.
valid(); ++it) {
950 ATYPE x = posOrthDir[*it];
963 bool subtractSep =
true;
964 if (nodeLow->
degree() == 2) {
967 if(m_pOR->direction(adj) == m_arcDir || m_pOR->direction(adj) == m_oppArcDir) {
974 m_pOR->direction(adj2) == m_pOR->direction(adjFound);
976 if(posDir[adjFound->
theNode()] == posDir[adj2->twinNode()])
1005 : vi.
m_corner[
static_cast<int>(dirMin)]->faceCycleSucc();
1013 ATYPE delta = (isCaseA)
1014 ? min(abs(posOrthDir[adjPred->
theNode()] - posOrthDir[adjPred->
twinNode()]), m_sep)
1015 : min(abs(posOrthDir[adj->
theNode()] - posOrthDir[adj->
twinNode()]), m_sep);
1016 ATYPE boundary = (isCaseA)
1017 ? min(posOrthDir[adjPred->
theNode()], posOrthDir[adjPred->
twinNode()])
1023 && m_pOR->angle(adjTwin) == 2) {
1026 low[s1] = lowReal[s1] - delta;
1027 low[s2] = lowReal[s2] - delta;
1033 && m_pOR->angle(adjTwin->
cyclicPred()) == 2) {
1036 low[s1] = lowReal[s1] - delta;
1037 low[s2] = lowReal[s2] - delta;
1044 OrthoDir runDir = m_pOR->direction(adjCross);
1047 && adjTwin->
theNode()->
degree() == 2 && m_pOR->angle(adjTwin) == angleAtMin) {
1050 node s = m_edgeToBasicArc[adjCross]->source();
1051 if (lowReal[s] != low[s]) {
1052 if (low[s] >= boundary) {
1057 low[s] += m_sep - delta;
1070 }
while (m_pOR->direction(adjCross) == segDir
1071 || m_pOR->direction(adjCross) == segOppDir);
1077 node sNext = m_edgeToBasicArc[adjCross]->opposite(s);
1079 if (segPos[sNext] != segPos[s]) {
1083 low[sNext] = lowReal[sNext];
1088 adjTwin = adjCross->
twin();
1090 if (runDir != m_pOR->direction(adjCross)) {
1106 ATYPE delta = -posOrthDir[adj->
twinNode()] + posOrthDir[adj->
theNode()];
1109 ATYPE delta = (isCaseA)
1110 ? min(abs(posOrthDir[adj->
twinNode()] - posOrthDir[adj->
theNode()]), m_sep)
1111 : min(abs(posOrthDir[adjPred->
theNode()] - posOrthDir[adjPred->
twinNode()]),
1113 ATYPE boundary = (isCaseA)
1115 : min(posOrthDir[adjPred->
theNode()], posOrthDir[adjPred->
twinNode()]);
1121 && m_pOR->angle(adjTwin->
cyclicPred()) == 2) {
1124 low[s1] = lowReal[s1] - delta;
1125 low[s2] = lowReal[s2] - delta;
1129 && m_pOR->angle(adjTwin) == 2) {
1132 low[s1] = lowReal[s1] - delta;
1133 low[s2] = lowReal[s2] - delta;
1142 OrthoDir runDir = m_pOR->direction(adjCross);
1145 && adjTwin->
theNode()->
degree() == 2 && m_pOR->angle(adjTwin) == angleAtMax) {
1146 node s = m_edgeToBasicArc[adjCross]->target();
1147 if (lowReal[s] != low[s]) {
1148 if (low[s] >= boundary) {
1153 low[s] += m_sep - delta;
1167 }
while (m_pOR->direction(adjCross) == segDir
1168 || m_pOR->direction(adjCross) == segOppDir);
1174 node sNext = m_edgeToBasicArc[adjCross]->opposite(s);
1176 if (segPos[sNext] != segPos[s]) {
1180 low[sNext] = lowReal[sNext];
1185 adjTwin = adjCross->
twin();
1188 if (runDir != m_pOR->direction(adjCross)) {
1198 computeTopologicalSegmentNum(topNum);
1204 allNodes(sortedPathNodes);
1211 for (itV = sortedPathNodes.
begin(); itV.
valid(); ++itV) {
1213 if (m_path[*itV].empty()) {
1220 for (it = sweepLine.
begin(); it.
valid(); ++it) {
1221 if ((*it).m_low < high[v]) {
1231 if ((*it).m_high <= low[v]) {
1239 bool isItUpDel = (((*itUp).m_low >= low[v]) && ((*itUp).m_high <= high[v]));
1241 for (; it.
valid() && (*it).m_low >= low[v]; it = itSucc) {
1243 if ((*it).m_high <= high[v]) {
1249 if (it == itUp && (*it).m_high > high[v]) {
1250 node w = (*it).m_pathNode;
1252 (*it).m_low = high[v];
1257 if ((!isItUpDel) && itUp != it && (*itUp).m_low < high[v]) {
1258 (*itUp).m_low = high[v];
1262 if ((*it).m_high > low[v]) {
1263 (*it).m_high = low[v];
1275 removeRedundantVisibArcs(visibArcs);
1285 node seg = m_pathNode[v];
1286 for (
adjEntry adj : v->adjEntries) {
1287 if (m_pOR->direction(adj) != segDir) {
1290 edge eAdj = adj->theEdge();
1292 if (eOrig ==
nullptr) {
1305 for (itT = visibArcs.
begin(); itT.
valid(); itT = itTSucc) {
1306 itTSucc = itT.
succ();
1307 node v = (*itT).x1(), w = (*itT).x2();
1310 if (correspEdge[v] && (correspEdge[v] == correspEdge[w])) {
1311 if (itTPred.
valid()) {
1324 for (itT = visibArcs.
begin(); itT.
valid(); ++itT) {
1326 node v = (*itT).x1(), w = (*itT).x2();
1327 if (!(m_extraNode[v] || m_extraNode[w])) {
1329 node boundRepresentant1 = m_path[v].front();
1330 node boundRepresentant2 = m_path[w].front();
1331 node en1 = m_pPR->expandedNode(boundRepresentant1);
1332 node en2 = m_pPR->expandedNode(boundRepresentant2);
1334 if (!((en1 && en2) && (en1 == en2))) {
1335 edge e = newEdge(v, w);
1339 m_length[e] = max(m_sep, minDist.
separation());
1343 writeGML(
"visibilityinserted.gml");
1355template<
class ATYPE>
1357 for (
edge e : getGraph().edges) {
1358 node v = m_path[e->source()].front();
1359 node w = m_path[e->target()].front();
1360 if (pos[w] - pos[v] < length(e)) {
1361 std::cout <<
"feasibility check failed for edge " << e << std::endl;
1362 std::cout <<
" representatives: " << v <<
", " << w << std::endl;
1363 std::cout <<
" length: " << length(e) << std::endl;
1364 std::cout <<
" actual distance: " << pos[w] - pos[v] << std::endl;
1365 std::cout <<
" type of " << e <<
": ";
1366 switch (m_type[e]) {
1368 std::cout <<
"basic arc" << std::endl;
1371 std::cout <<
"vertex-size arc" << std::endl;
1374 std::cout <<
"visibility arc" << std::endl;
1377 std::cout <<
"median arc" << std::endl;
1380 std::cout <<
"reducible arc" << std::endl;
1383 std::cout <<
"fixtozero arc" << std::endl;
Declares ogdf::CommonCompactionConstraintGraphBase.
Includes declaration of graph class.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
Declaration of orthogonal representation of planar graphs.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
Declaration of singly linked lists and iterators.
Basic declarations, included by all source files.
Class for adjacency list elements.
adjEntry faceCyclePred() const
Returns the cyclic predecessor in face.
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
adjEntry cyclicSucc() const
Returns the cyclic successor in the adjacency list.
edge theEdge() const
Returns the edge associated with this adjacency entry.
adjEntry cyclicPred() const
Returns the cyclic predecessor in the adjacency list.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
node theNode() const
Returns the node whose adjacency list contains this element.
adjEntry faceCycleSucc() const
Returns the cyclic successor in face.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Base class for ogdf::CompactionConstraintGraphBase.
NodeArray< bool > m_extraNode
Node does not represent drawing node as we dont have positions we save a drawing representant and an ...
NodeArray< node > m_extraRep
existing representant of extranodes position anchor
Comparer class used for sorting segments by increasing position (given by segPos) such that two overl...
const NodeArray< int > * m_pSec
SegmentComparer(const NodeArray< ATYPE > &segPos, const NodeArray< int > &secSort)
const NodeArray< ATYPE > * m_pPos
int compare(const node &x, const node &y) const
Class implementing template-parameter-independent behaviour of ogdf::CompactionConstraintGraph.
void align(bool b)
Triggers alignment (=>some special edge handling to support al.)
bool verticalArc(edge e) const
Returns true if e is basic arc of vertical edge in PlanRepUML hierarchy.
EdgeArray< bool > m_alignmentArc
Basic arcs that have to be short for alignment (node to gen expander)
void dfsInsertPathVertex(node v, node pathVertex, NodeArray< bool > &visited, const NodeArray< node > &genOpposite)
bool verticalGen(edge e) const
Returns true if e is vertical edge in PlanRepUML hierarchy.
EdgeArray< bool > m_verticalGen
generalization that runs vertical relative to hierarchy
bool alignmentArc(edge e) const
Returns if arc is important for alignment. These are the arcs representing node to gen....
void insertPathVertices(const PlanRep &PG)
edge pathToOriginal(node v)
CompactionConstraintGraphBase(const OrthoRep &OR, const PlanRep &PG, OrthoDir arcDir, int costGen=1, int costAssoc=1, bool align=false)
Construction.
void insertBasicArcs(const PlanRep &PG)
EdgeArray< bool > m_verticalArc
arc corresponding to such an edge
NodeArray< edge > m_pathToEdge
save the (single!) edge (segment) for a pathNode
Represents a constraint graph used for compaction.
ATYPE separation() const
Returns the separation value.
NodeArray< ATYPE > m_extraOfs
offset of extra node to its rep, should change this
bool m_genToMedian
draw outgoing generalization from merger above ingoing gen.
ATYPE extraOfs(node v) const
Returns extraNode position, change to save mem, only need some entries.
static const int c_bungeeFactor
EdgeArray< ATYPE > m_length
length of an edge
void insertVertexSizeArcs(const PlanRep &PG, const NodeArray< ATYPE > &sizeOrig, const RoutingChannel< ATYPE > &rc)
Inserts arcs for respecting sizes of vertices and achieving desired placement of generalizations if v...
CompactionConstraintGraph(const OrthoRep &OR, const PlanRep &PG, OrthoDir arcDir, ATYPE sep, int costGen=1, int costAssoc=1, bool align=false)
Construction.
static const int c_vertexArcFactor
void setMinimumSeparation(const PlanRep &PG, const NodeArray< int > &coord, const MinimumEdgeDistances< ATYPE > &minDist)
Sets min separation for multi edge original.
void resetGenMergerLengths(const PlanRep &PG, adjEntry adjFirst)
void insertVisibilityArcs(const PlanRep &PG, const NodeArray< ATYPE > &posDir, const NodeArray< ATYPE > &posOppDir)
Inserts arcs connecting segments which can see each other in a drawing of the associated planarized r...
int m_doubleBendCost
try to minimize double bends
int m_bungeeCost
middle position distance penalty
bool centerPriority()
Gets centerPriority (center single edges?)
static const int c_MedianFactor
median arcs cost factor*vertexArcCost
bool isFeasible(const NodeArray< ATYPE > &pos)
Performs feasibility test for position assignment pos, i.e., checks if the segment positions given by...
void setBasicArcsZeroLength(const PlanRep &PG)
virtual string getLengthString(edge e) const override
int m_MedianArcCost
draw merger gen at median of incoming generalizations
bool m_centerPriority
should centering be more expensive than generalizations
bool checkSweepLine(const List< Interval > &sweepLine) const
static const int c_doubleBendFactor
double bends cost factor*vertexArcCost
ATYPE length(edge e) const
Returns length of edge e.
void setBoundaryCosts(adjEntry cornerDir, adjEntry cornerOppDir)
void setExtra(node v, node rep, ATYPE ofs)
Node v has no representation in drawing, only internal representation.
void centerPriority(bool b)
Sets centerPriority (center single edges?)
bool areMulti(edge e1, edge e2) const
Return PG result for flowcompaction.
ATYPE computeTotalCosts(const NodeArray< ATYPE > &pos) const
Computes the total costs for coordintes given by pos, i.e., the sum of the weighted lengths of edges ...
int m_vertexArcCost
get small cages
Class for the representation of edges.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
const Graph & original() const
Returns a reference to the original graph.
Data type for general directed graphs (adjacency list representation).
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
NodeType
The type of nodes.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Doubly linked lists (maintaining the length of the list).
iterator pushBack(const E &x)
Adds element x at the end of the list.
void del(iterator it)
Removes it from the list.
iterator insertBefore(const E &x, iterator it)
Inserts element x before it.
iterator insertAfter(const E &x, iterator it)
Inserts element x after it.
Encapsulates a pointer to a list element.
bool valid() const
Returns true iff the iterator points to an element.
ListIteratorBase< E, isConst, isReverse > succ() const
Returns successor iterator.
iterator begin()
Returns an iterator to the first element of the list.
bool empty() const
Returns true iff the list is empty.
void quicksort()
Sorts the list using Quicksort.
Maintains input sizes for improvement compaction (deltas and epsilons)
const ATYPE & epsilon(node v, OrthoDir s, int i) const
const ATYPE & delta(node v, OrthoDir s, int i) const
Class for the representation of nodes.
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.
Orthogonal representation of an embedded graph.
static OrthoDir prevDir(OrthoDir d)
Returns the previous OrthoDir (in a clockwise manner)
static OrthoDir nextDir(OrthoDir d)
Returns the next OrthoDir (in a clockwise manner)
Planarized representations (of a connected component) of a graph.
Graph::NodeType typeOf(node v) const
Returns the type of node v.
adjEntry expandAdj(node v) const
Returns the adjacency entry of a node of an expanded face.
Maintains input sizes for constructive compaction (size of routing channels, separation,...
Encapsulates a pointer to an ogdf::SList element.
bool valid() const
Returns true iff the iterator points to an element.
SListIteratorBase< E, isConst > succ() const
Returns successor iterator.
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.
void delSucc(iterator itBefore)
Removes the succesor of itBefore.
void popFront()
Removes the first element from the list.
Tuples of two elements (2-tuples).
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
Declarations for Comparer objects.
Definition of exception classes.
#define OGDF_AUGMENT_COMPARER(type)
Add this macro to your class to turn it into a full comparer.
#define OGDF_THROW(CLASS)
Replacement for throw.
#define OGDF_HEAVY_ASSERT(expr)
Assert condition expr when using heavy debugging. See OGDF_ASSERT.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.
@ ReducibleArc
can be compacted to zero length
@ FixToZeroArc
can be compacted to zero length, can be fixed
@ MedianArc
inserted to replace some reducible in fixzerolength
Represents an interval on the sweep line.
ATYPE m_high
lower and upper bound
friend std::ostream & operator<<(std::ostream &os, const Interval &interval)
output operator
Interval(node v, ATYPE low, ATYPE high)
node m_pathNode
corresponding segment
Information about a side of a vertex in UML diagrams.
int totalAttached() const
Further information about the cages of vertices in UML diagrams.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.