Computes statistical information about a layout.
More...
#include <ogdf/basic/LayoutStatistics.h>
Computes statistical information about a layout.
Definition at line 44 of file LayoutStatistics.h.
◆ angles()
Computes the angle for each pair of adjacent edge segments of the layout ga
.
Angles are given in radians.
- Parameters
-
ga | Input layout. |
considerBends | Determines whether bend points of edges shall be considered. |
- Returns
- The angle for each two adjacent edge segments.
◆ edgeLengths()
Computes the edge length for each edge in the layout ga
.
- Parameters
-
ga | Input layout. |
considerSelfLoops | Determines whether the lengths of self-loops are considered. |
- Returns
- The edge length for each edge.
◆ intersectionGraph()
Computes the intersection graph H
of the line segments in the layout given by ga
.
The nodes of the intersection graph are all endpoints of segments in ga
plus all intersection points. The edges corrsepond to edges in the input layout: If an edge connecting points v and w in H
corresponds to an edge e in the input graph, then e contains a line segment s such that both v and w are endpoints or intersection points of s.
To put it more simple, we obtain graph H
from ga
by putting a dummy vertex on each crossing and bend point, and joining all nodes representing the same point in the plane.
- Warning
- Do not call this algorithm on drawings with arbitrarily close curves (e.g., curves overlapping on an interval).
- Parameters
-
ga | Input layout. If it contains bend points, each segment of an edge's polyline is considered as a line segment. Otherwise, a straight-line drawing is assumed. |
H | Is assigned the intersection graph. |
points | Maps nodes in H to their geometric position in the layout. |
origNode | Maps nodes in H to nodes in ga's graph. Points that are only intersection points of segments are mapped to nullptr . |
origEdge | Maps edges in H to the corresponding edges in ga's graph. |
◆ numberOfBends()
Computes the number of bends (i.e. bend-points) for each edge in the layout ga
.
- Parameters
-
ga | Input layout. |
considerSelfLoops | Determines whether the bends of self-loops are considered. |
- Returns
- The number of bends for each edge.
◆ numberOfCrossings()
Computes the number of edge crossings for each edge in the layout ga
.
If several edge segments cross in the same point, this is counted as if all of these segments would cross pairwise. E.g., if three edge segments cross in a common points, this counts as two crossings for each of the edges.
- Warning
- The same warning as for intersectionGraph applies.
-
The sum of all returned values is twice the number of crossings as each crossing involves two edges.
- Parameters
-
ga | Input layout. If it contains bend points, each segment of an edge's polyline is considered as a line segment. Otherwise, a straight-line drawing is assumed. |
- Returns
- The number of crossings for each edge.
◆ numberOfNodeCrossings()
Computes the number of crossings through a non-incident node for each edge in the layout ga
.
If several edge segments cross a node in the same point, one crossing per edge segment is counted. E.g., if three edge segments cross a node in a common point, this counts as three node crossings. Each node is treated as if it had the shape of the rectangle with the corresponding width and height given by ga
.
- Parameters
-
ga | Input layout. If it contains bend points, each segment of an edge's polyline is considered as a line segment. Otherwise, a straight-line drawing is assumed. |
- Returns
- The number of node crossings for each edge.
◆ numberOfNodeOverlaps()
Computes the number of node overlaps for each node in the layout ga
.
Each node is treated as if it had the shape of the rectangle with the corresponding width and height given by ga
.
- Warning
- The sum of all returned values is twice the number of node overlaps as each node overlap involves two nodes.
- Parameters
-
- Returns
- The number of node overlaps for each node.
The documentation for this class was generated from the following file: