#include <OptimalHierarchyLayout.h>

Public Member Functions | |
| OptimalHierarchyLayout () | |
| Creates an instance of optimal hierarchy layout. | |
| OptimalHierarchyLayout (const OptimalHierarchyLayout &) | |
| Copy constructor. | |
| ~OptimalHierarchyLayout () | |
| OptimalHierarchyLayout & | operator= (const OptimalHierarchyLayout &) |
| 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. | |
Protected Member Functions | |
| void | doCall (const Hierarchy &H, GraphCopyAttributes &AGC) |
| Implements the algorithm call. | |
Private Member Functions | |
| void | computeXCoordinates (const Hierarchy &H, GraphCopyAttributes &AGC) |
| void | computeYCoordinates (const Hierarchy &H, GraphCopyAttributes &AGC) |
Private Attributes | |
| double | m_nodeDistance |
| The minimal distance between nodes. | |
| double | m_layerDistance |
| The minimal distance between layers. | |
| bool | m_fixedLayerDistance |
| Use fixed layer distances? | |
| double | m_weightSegments |
| The weight of edge segments. | |
| double | m_weightBalancing |
| The weight for balancing. | |
OptimalHierarchyLayout implements a hierarchy layout algorithm 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. |
Definition at line 101 of file OptimalHierarchyLayout.h.
| ogdf::OptimalHierarchyLayout::OptimalHierarchyLayout | ( | ) |
Creates an instance of optimal hierarchy layout.
| ogdf::OptimalHierarchyLayout::OptimalHierarchyLayout | ( | const OptimalHierarchyLayout & | ) |
Copy constructor.
| ogdf::OptimalHierarchyLayout::~OptimalHierarchyLayout | ( | ) | [inline] |
Definition at line 119 of file OptimalHierarchyLayout.h.
| OptimalHierarchyLayout& ogdf::OptimalHierarchyLayout::operator= | ( | const OptimalHierarchyLayout & | ) |
Assignment operator.
| double ogdf::OptimalHierarchyLayout::nodeDistance | ( | ) | const [inline] |
Returns the minimal allowed x-distance between nodes on a layer.
Definition at line 132 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::nodeDistance | ( | double | x | ) | [inline] |
Sets the minimal allowed x-distance between nodes on a layer to x.
Definition at line 137 of file OptimalHierarchyLayout.h.
| double ogdf::OptimalHierarchyLayout::layerDistance | ( | ) | const [inline] |
Returns the minimal allowed y-distance between layers.
Definition at line 143 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::layerDistance | ( | double | x | ) | [inline] |
Sets the minimal allowed y-distance between layers to x.
Definition at line 148 of file OptimalHierarchyLayout.h.
| bool ogdf::OptimalHierarchyLayout::fixedLayerDistance | ( | ) | const [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 158 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::fixedLayerDistance | ( | bool | b | ) | [inline] |
| double ogdf::OptimalHierarchyLayout::weightSegments | ( | ) | const [inline] |
Returns the weight of edge segments connecting to vertical segments.
Definition at line 168 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::weightSegments | ( | double | w | ) | [inline] |
Sets the weight of edge segments connecting to vertical segments to w.
Definition at line 173 of file OptimalHierarchyLayout.h.
| double ogdf::OptimalHierarchyLayout::weightBalancing | ( | ) | const [inline] |
Returns the weight for balancing successors below a node; 0.0 means no balancing.
Definition at line 179 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::weightBalancing | ( | double | w | ) | [inline] |
Sets the weight for balancing successors below a node to w; 0.0 means no balancing.
Definition at line 184 of file OptimalHierarchyLayout.h.
| void ogdf::OptimalHierarchyLayout::doCall | ( | const Hierarchy & | H, | |
| GraphCopyAttributes & | AGC | |||
| ) | [protected, virtual] |
| void ogdf::OptimalHierarchyLayout::computeXCoordinates | ( | const Hierarchy & | H, | |
| GraphCopyAttributes & | AGC | |||
| ) | [private] |
| void ogdf::OptimalHierarchyLayout::computeYCoordinates | ( | const Hierarchy & | H, | |
| GraphCopyAttributes & | AGC | |||
| ) | [private] |
double ogdf::OptimalHierarchyLayout::m_nodeDistance [private] |
double ogdf::OptimalHierarchyLayout::m_layerDistance [private] |
bool ogdf::OptimalHierarchyLayout::m_fixedLayerDistance [private] |
double ogdf::OptimalHierarchyLayout::m_weightSegments [private] |
double ogdf::OptimalHierarchyLayout::m_weightBalancing [private] |