#include <ogdf/misclayout/BalloonLayout.h>
Public Types | |
enum class | ChildOrder { Fixed , Optimized } |
enum class | RootSelection { Center , HighestDegree } |
enum class | TreeComputation { Bfs , Dfs , BfsRandom } |
Public Member Functions | |
BalloonLayout () | |
Constructor, sets options to default values. | |
virtual void | call (GraphAttributes &AG) override |
Standard call using the stored parameter settings. | |
virtual void | callFractal (GraphAttributes &AG, double ratio=0.3) |
Call using special parameter settings for fractal model takes radius ratio < 0.5 as parameter. | |
bool | getEvenAngles () |
returns how the angles are assigned to subtrees. | |
BalloonLayout & | operator= (const BalloonLayout &bl) |
Assignmentoperator. | |
void | setEvenAngles (bool b) |
Subtrees may be assigned even angles or angles depending on their size. | |
Public Member Functions inherited from ogdf::LayoutModule | |
LayoutModule () | |
Initializes a layout module. | |
virtual | ~LayoutModule () |
void | operator() (GraphAttributes &GA) |
Computes a layout of graph GA . | |
Protected Member Functions | |
void | computeAngles (const Graph &G) |
Computes the angle distribution: assigns m_angle each node. | |
void | computeBFSTree (const Graph &G, node v) |
Computes tree by BFS, fills m_parent and m_childCount. | |
void | computeCoordinates (GraphAttributes &AG) |
Computes coordinates from angles and radii. | |
void | computeRadii (const GraphAttributes &AG) |
Computes a radius for each of the vertices in G. fractal model: same radius on same level, such that r(m) = gamma* r(m-1) where gamma is predefined SNS model: different radii possible Optimal: unordered tree, order of children is optimized. | |
void | computeTree (const Graph &G) |
Computes the spanning tree that is used for the layout computation, the non-tree edges are simply added into the layout. | |
void | selectRoot (const Graph &G) |
Selects the root of the spanning tree that is placed in the layout center. | |
Private Member Functions | |
void | check (Graph &G) |
Use even angles independent of subtree size. | |
Private Attributes | |
NodeArray< double > | m_angle |
Angle assigned to nodes. | |
NodeArray< int > | m_childCount |
Number of children in spanning tree. | |
NodeArray< List< node > > | m_childList |
ChildOrder | m_childOrder |
How to arrange the children. | |
NodeArray< double > | m_estimate |
Rough estimate of circumference of subtrees. | |
double | m_estimateFactor |
Weight of value (largestchild / number of children) added to estimate to compute radius. | |
bool | m_evenAngles |
NodeArray< double > | m_maxChildRadius |
Outer radius of largest child. | |
NodeArray< double > | m_oRadius |
Radius at node center. | |
NodeArray< node > | m_parent |
Parent in spanning tree. | |
NodeArray< double > | m_radius |
node | m_root |
Root of tree by selection method. | |
RootSelection | m_rootSelection |
Defines how the tree root is selected. | |
NodeArray< double > | m_size |
Radius of circle around node box. | |
TreeComputation | m_treeComputation |
How to derive the spanning tree. | |
node | m_treeRoot |
Root of tree after computation. | |
Definition at line 56 of file BalloonLayout.h.
Enumerator | |
---|---|
Fixed | |
Optimized |
Definition at line 63 of file BalloonLayout.h.
Enumerator | |
---|---|
Center | |
HighestDegree |
Definition at line 60 of file BalloonLayout.h.
Enumerator | |
---|---|
Bfs | |
Dfs | |
BfsRandom |
Definition at line 65 of file BalloonLayout.h.
ogdf::BalloonLayout::BalloonLayout | ( | ) |
Constructor, sets options to default values.
|
overridevirtual |
Standard call using the stored parameter settings.
Implements ogdf::LayoutModule.
|
inlinevirtual |
Call using special parameter settings for fractal model takes radius ratio < 0.5 as parameter.
Definition at line 77 of file BalloonLayout.h.
Computes the angle distribution: assigns m_angle each node.
Computes tree by BFS, fills m_parent and m_childCount.
|
protected |
Computes coordinates from angles and radii.
|
protected |
Computes a radius for each of the vertices in G. fractal model: same radius on same level, such that r(m) = gamma* r(m-1) where gamma is predefined SNS model: different radii possible Optimal: unordered tree, order of children is optimized.
Computes the spanning tree that is used for the layout computation, the non-tree edges are simply added into the layout.
|
inline |
returns how the angles are assigned to subtrees.
Definition at line 88 of file BalloonLayout.h.
BalloonLayout & ogdf::BalloonLayout::operator= | ( | const BalloonLayout & | bl | ) |
Assignmentoperator.
Selects the root of the spanning tree that is placed in the layout center.
Subtrees may be assigned even angles or angles depending on their size.
Definition at line 85 of file BalloonLayout.h.
Angle assigned to nodes.
Definition at line 126 of file BalloonLayout.h.
Number of children in spanning tree.
Definition at line 125 of file BalloonLayout.h.
Definition at line 130 of file BalloonLayout.h.
|
private |
How to arrange the children.
Definition at line 143 of file BalloonLayout.h.
Rough estimate of circumference of subtrees.
Definition at line 127 of file BalloonLayout.h.
|
private |
Weight of value (largestchild / number of children) added to estimate to compute radius.
Definition at line 141 of file BalloonLayout.h.
|
private |
Definition at line 145 of file BalloonLayout.h.
Outer radius of largest child.
Definition at line 123 of file BalloonLayout.h.
Radius at node center.
Outer radius enclosing all children.
Definition at line 122 of file BalloonLayout.h.
Parent in spanning tree.
Definition at line 124 of file BalloonLayout.h.
Definition at line 121 of file BalloonLayout.h.
|
private |
Root of tree by selection method.
Definition at line 139 of file BalloonLayout.h.
|
private |
Defines how the tree root is selected.
Definition at line 137 of file BalloonLayout.h.
Radius of circle around node box.
Definition at line 128 of file BalloonLayout.h.
|
private |
How to derive the spanning tree.
Definition at line 144 of file BalloonLayout.h.
|
private |
Root of tree after computation.
Definition at line 138 of file BalloonLayout.h.