Utility class providing functions for computing statistical information about a layout.
More...
#include <ogdf/basic/LayoutStatistics.h>
|
| static double | angularResolution (const GraphAttributes &ga, double *pMaxAngle=nullptr, double *pAvgAngle=nullptr, double *pStdDeviation=nullptr, bool considerBends=true) |
| | Computes the angular resolution of the layout given by ga. More...
|
| |
| static double | edgeLengths (const GraphAttributes &ga, double *pMinLength=nullptr, double *pMaxLength=nullptr, double *pAvgLength=nullptr, double *pStdDeviation=nullptr, bool considerSelfLoops=false) |
| | Computes the total edge lengths in the layout given by ga. More...
|
| |
| static void | intersectionGraph (const GraphAttributes &ga, Graph &H, NodeArray< DPoint > &points, NodeArray< node > &origNode, EdgeArray< edge > &origEdge) |
| | Computes the intersection graph H of the line segments in the layout given by ga. More...
|
| |
| static int | numberOfBends (const GraphAttributes &ga, int *pMinBendsPerEdge=nullptr, int *pMaxBendsPerEdge=nullptr, double *pAvgBendsPerEdge=nullptr, double *pStdDeviation=nullptr, bool considerSelfLoops=false) |
| | Computes the total number of bends in the layout given by ga. More...
|
| |
| static int | numberOfCrossings (const GraphAttributes &ga) |
| | Computes the number of edge crossings in the layout given by ga. More...
|
| |
Utility class providing functions for computing statistical information about a layout.
Definition at line 45 of file LayoutStatistics.h.
◆ angularResolution()
| static double ogdf::LayoutStatistics::angularResolution |
( |
const GraphAttributes & |
ga, |
|
|
double * |
pMaxAngle = nullptr, |
|
|
double * |
pAvgAngle = nullptr, |
|
|
double * |
pStdDeviation = nullptr, |
|
|
bool |
considerBends = true |
|
) |
| |
|
static |
Computes the angular resolution of the layout given by ga.
The angular resolution of a layout is the smallest angle formed by two edge segments that meet in a common endpoint or bend point. Angles are given in radians.
- Parameters
-
| ga | is the input layout. |
| pMaxAngle | points to a variable in which the largest angle in the layout is stored; pMaxAngle may be a nullptr in which case nothing is stored. |
| pAvgAngle | points to a variable in which the average angle in the layout is stored; pAvgAngle may be a nullptr in which case nothing is stored. |
| pStdDeviation | points to a variable in which the standard deviation of angles is stored; pStdDeviation may be a nullptr in which case nothing is stored. |
| considerBends | determines whether bend points of edges shall be considered (true) or not (false). |
- Returns
- the angular resolution (smallest angle) of the layout.
◆ edgeLengths()
| static double ogdf::LayoutStatistics::edgeLengths |
( |
const GraphAttributes & |
ga, |
|
|
double * |
pMinLength = nullptr, |
|
|
double * |
pMaxLength = nullptr, |
|
|
double * |
pAvgLength = nullptr, |
|
|
double * |
pStdDeviation = nullptr, |
|
|
bool |
considerSelfLoops = false |
|
) |
| |
|
static |
Computes the total edge lengths in the layout given by ga.
- Parameters
-
| ga | is the input layout. |
| pMinLength | points to a variable in which the minimum lengths of an edge is stored; pMinLength may be a nullptr in which case nothing is stored. |
| pMaxLength | points to a variable in which the maximum lengths of an edge is stored; pMaxLength may be a nullptr in which case nothing is stored. |
| pAvgLength | points to a variable in which the average lengths of an edge is stored; pAvgLength may be a nullptr in which case nothing is stored. |
| pStdDeviation | points to a variable in which the standard deviation of edge lengths is stored; pStdDeviation may be a nullptr in which case nothing is stored. |
| considerSelfLoops | determines whether the lengths of self-loops shall be considered (true) or not (false). |
- Returns
- the sum of all edge lengths.
◆ intersectionGraph()
Computes the intersection graph H of the line segments in the layout given by ga.
The nodes of the intersection graph are all the endpoints of segments in the layout and intersection points. The edges corrsepond to edges in the input layout: If an edge connecting points p and q in H corresponds to an edge e in the input graph, then e contains a line segment s such that both p and q are endpoints or intersection points of s.
To put it more simple, we obtain graph H from the input layout ga by putting a dummy vertex on each crossing and bend point, and joining all nodes representing the same point in the plane.
- Parameters
-
| ga | is the input layout; if it contains bend points, edge segement of an edge's polyline is considered as line segment. |
| 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 the input graph (given by ga); points which are only intersection points of segments are mapped to nullptr. |
| origEdge | maps edges in H to the corresponding edges in the input graph (given by ga). |
◆ numberOfBends()
| static int ogdf::LayoutStatistics::numberOfBends |
( |
const GraphAttributes & |
ga, |
|
|
int * |
pMinBendsPerEdge = nullptr, |
|
|
int * |
pMaxBendsPerEdge = nullptr, |
|
|
double * |
pAvgBendsPerEdge = nullptr, |
|
|
double * |
pStdDeviation = nullptr, |
|
|
bool |
considerSelfLoops = false |
|
) |
| |
|
static |
Computes the total number of bends in the layout given by ga.
- Parameters
-
| ga | is the input layout. |
| pMinBendsPerEdge | points to a variable in which the minimum lengths of an edge is stored; pMinBendsPerEdge may be a nullptr in which case nothing is stored. |
| pMaxBendsPerEdge | points to a variable in which the maximum lengths of an edge is stored; pMaxBendsPerEdge may be a nullptr in which case nothing is stored. |
| pAvgBendsPerEdge | points to a variable in which the average lengths of an edge is stored; pAvgBendsPerEdge may be a nullptr in which case nothing is stored. |
| pStdDeviation | points to a variable in which the standard deviation of edge lengths is stored; pStdDeviation may be a nullptr in which case nothing is stored. |
| considerSelfLoops | determines whether the bends of self-loops shall be considered (true) or not (false). |
- Returns
- the total number of bend points on all edges.
◆ numberOfCrossings()
| static int ogdf::LayoutStatistics::numberOfCrossings |
( |
const GraphAttributes & |
ga | ) |
|
|
static |
Computes the number of edge crossings in the layout given by 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 three crossings.
- Parameters
-
| ga | is the input layout; if it contains bend points, edge segement of an edge's polyline is considered as line segment. |
- Returns
- the number of line crossings.
The documentation for this class was generated from the following file: