The LP-based hierarchy cluster layout algorithm. More...
#include <ogdf/layered/OptimalHierarchyClusterLayout.h>
Inheritance diagram for ogdf::OptimalHierarchyClusterLayout:Public Member Functions | |
| OptimalHierarchyClusterLayout () | |
| Creates an instance of optimal hierarchy layout for clusters. | |
| OptimalHierarchyClusterLayout (const OptimalHierarchyClusterLayout &) | |
| Copy constructor. | |
| ~OptimalHierarchyClusterLayout () | |
| OptimalHierarchyClusterLayout & | operator= (const OptimalHierarchyClusterLayout &) |
| Assignment operator. | |
Optional parameters | |
| double | nodeDistance () const |
| Returns the minimal allowed x-distance between nodes on a layer. | |
| void | nodeDistance (double x) |
Sets the minimal allowed x-distance between nodes on a layer to x. | |
| double | layerDistance () const |
| Returns the minimal allowed y-distance between layers. | |
| void | layerDistance (double x) |
Sets the minimal allowed y-distance between layers to x. | |
| bool | fixedLayerDistance () const |
| Returns the current setting of option fixedLayerDistance. | |
| void | fixedLayerDistance (bool b) |
Sets the option fixedLayerDistance to b. | |
| double | weightSegments () const |
| Returns the weight of edge segments connecting to vertical segments. | |
| void | weightSegments (double w) |
Sets the weight of edge segments connecting to vertical segments to w. | |
| double | weightBalancing () const |
| Returns the weight for balancing successors below a node; 0.0 means no balancing. | |
| void | weightBalancing (double w) |
Sets the weight for balancing successors below a node to w; 0.0 means no balancing. | |
| double | weightClusters () const |
| Returns the weight for cluster boundary variables. | |
| void | weightClusters (double w) |
Sets the weight for cluster boundary variables to w. | |
Public Member Functions inherited from ogdf::HierarchyClusterLayoutModule | |
| HierarchyClusterLayoutModule () | |
| Initializes a hierarchy cluster layout module. | |
| virtual | ~HierarchyClusterLayoutModule () |
| void | callCluster (const ExtendedNestingGraph &H, ClusterGraphAttributes &ACG) |
Computes a hierarchy layout of a clustered hierarchy H in ACG. | |
Protected Member Functions | |
| virtual void | doCall (const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &ACGC) override |
| Implements the algorithm call. | |
Private Member Functions | |
| void | buildLayerList (const LHTreeNode *vNode, List< Tuple2< int, double > > &L) |
| void | computeXCoordinates (const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &AGC) |
| void | computeYCoordinates (const ExtendedNestingGraph &H, ClusterGraphCopyAttributes &AGC) |
Private Attributes | |
| ClusterArray< int > | m_cIndex |
| int | m_clusterLeftOffset |
| int | m_clusterRightOffset |
| bool | m_fixedLayerDistance |
| Use fixed layer distances? | |
| NodeArray< bool > | m_isVirtual |
| double | m_layerDistance |
| The minimal distance between layers. | |
| double | m_nodeDistance |
| The minimal distance between nodes. | |
| ClusterGraphCopyAttributes * | m_pACGC |
| const ExtendedNestingGraph * | m_pH |
| int | m_segmentOffset |
| int | m_vertexOffset |
| NodeArray< int > | m_vIndex |
| double | m_weightBalancing |
| The weight for balancing. | |
| double | m_weightClusters |
| The weight for cluster boundary variables. | |
| double | m_weightSegments |
| The weight of edge segments. | |
The LP-based hierarchy cluster layout algorithm.
OptimalHierarchyClusterLayout implements a hierarchy layout algorithm fpr cluster graphs that is based on an LP-formulation. It is only available if OGDF is compiled with LP-solver support (e.g., Coin).
The used model avoids Spaghetti-effect like routing of edges by using long vertical segments as in FastHierarchyLayout. An additional balancing can be used which balances the successors below a node.
| Option | Type | Default | Description |
|---|---|---|---|
| nodeDistance | double | 3.0 | The minimal allowed x-distance between nodes on a layer. |
| layerDistance | double | 3.0 | The minimal allowed y-distance between layers. |
| fixedLayerDistance | bool | false | If set to true, the distance between neighboured layers is always layerDistance; otherwise the distance is adjusted (increased) to improve readability. |
| weightSegments | double | 2.0 | The weight of edge segments connecting to vertical segments. |
| weightBalancing | double | 0.1 | The weight for balancing successors below a node; 0.0 means no balancing. |
| weightClusters | double | 0.05 | The weight for cluster boundary variables. |
Definition at line 88 of file OptimalHierarchyClusterLayout.h.
| ogdf::OptimalHierarchyClusterLayout::OptimalHierarchyClusterLayout | ( | ) |
Creates an instance of optimal hierarchy layout for clusters.
| ogdf::OptimalHierarchyClusterLayout::OptimalHierarchyClusterLayout | ( | const OptimalHierarchyClusterLayout & | ) |
Copy constructor.
|
inline |
Definition at line 97 of file OptimalHierarchyClusterLayout.h.
|
private |
|
private |
|
private |
|
overrideprotectedvirtual |
Implements the algorithm call.
Implements ogdf::HierarchyClusterLayoutModule.
|
inline |
Returns the current setting of option fixedLayerDistance.
If set to true, the distance is always layerDistance; otherwise the distance is adjusted (increased) to improve readability.
Definition at line 132 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the option fixedLayerDistance to b.
Definition at line 135 of file OptimalHierarchyClusterLayout.h.
|
inline |
Returns the minimal allowed y-distance between layers.
Definition at line 118 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the minimal allowed y-distance between layers to x.
Definition at line 121 of file OptimalHierarchyClusterLayout.h.
|
inline |
Returns the minimal allowed x-distance between nodes on a layer.
Definition at line 108 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the minimal allowed x-distance between nodes on a layer to x.
Definition at line 111 of file OptimalHierarchyClusterLayout.h.
| OptimalHierarchyClusterLayout & ogdf::OptimalHierarchyClusterLayout::operator= | ( | const OptimalHierarchyClusterLayout & | ) |
Assignment operator.
|
inline |
Returns the weight for balancing successors below a node; 0.0 means no balancing.
Definition at line 148 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
Definition at line 151 of file OptimalHierarchyClusterLayout.h.
|
inline |
Returns the weight for cluster boundary variables.
Definition at line 158 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the weight for cluster boundary variables to w.
Definition at line 161 of file OptimalHierarchyClusterLayout.h.
|
inline |
Returns the weight of edge segments connecting to vertical segments.
Definition at line 138 of file OptimalHierarchyClusterLayout.h.
|
inline |
Sets the weight of edge segments connecting to vertical segments to w.
Definition at line 141 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 199 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 194 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 195 of file OptimalHierarchyClusterLayout.h.
|
private |
Use fixed layer distances?
Definition at line 182 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 197 of file OptimalHierarchyClusterLayout.h.
|
private |
The minimal distance between layers.
Definition at line 181 of file OptimalHierarchyClusterLayout.h.
|
private |
The minimal distance between nodes.
Definition at line 180 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 189 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 190 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 193 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 192 of file OptimalHierarchyClusterLayout.h.
|
private |
Definition at line 198 of file OptimalHierarchyClusterLayout.h.
|
private |
The weight for balancing.
Definition at line 185 of file OptimalHierarchyClusterLayout.h.
|
private |
The weight for cluster boundary variables.
Definition at line 186 of file OptimalHierarchyClusterLayout.h.
|
private |
The weight of edge segments.
Definition at line 184 of file OptimalHierarchyClusterLayout.h.