Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::BalloonLayout Class Reference

#include <ogdf/misclayout/BalloonLayout.h>

+ Inheritance diagram for ogdf::BalloonLayout:

Public Types

enum  ChildOrder { ChildOrder::Fixed, ChildOrder::Optimized }
 
enum  RootSelection { RootSelection::Center, RootSelection::HighestDegree }
 
enum  TreeComputation { TreeComputation::Bfs, TreeComputation::Dfs, TreeComputation::BfsRandom }
 

Public Member Functions

 BalloonLayout ()
 Constructor, sets options to default values. More...
 
virtual void call (GraphAttributes &AG) override
 Standard call using the stored parameter settings. More...
 
virtual void callFractal (GraphAttributes &AG, double ratio=0.3)
 Call using special parameter settings for fractal model takes radius ratio < 0.5 as parameter. More...
 
bool getEvenAngles ()
 returns how the angles are assigned to subtrees. More...
 
BalloonLayoutoperator= (const BalloonLayout &bl)
 Assignmentoperator. More...
 
void setEvenAngles (bool b)
 Subtrees may be assigned even angles or angles depending on their size. More...
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module. More...
 
virtual ~LayoutModule ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA. More...
 

Protected Member Functions

void computeAngles (const Graph &G)
 Computes the angle distribution: assigns m_angle each node. More...
 
void computeBFSTree (const Graph &G, node v)
 Computes tree by BFS, fills m_parent and m_childCount. More...
 
void computeCoordinates (GraphAttributes &AG)
 Computes coordinates from angles and radii. More...
 
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. More...
 
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. More...
 
void selectRoot (const Graph &G)
 Selects the root of the spanning tree that is placed in the layout center. More...
 

Private Member Functions

void check (Graph &G)
 Use even angles independent of subtree size. More...
 

Private Attributes

NodeArray< double > m_angle
 Angle assigned to nodes. More...
 
NodeArray< int > m_childCount
 Number of children in spanning tree. More...
 
NodeArray< List< node > > m_childList
 
ChildOrder m_childOrder
 How to arrange the children. More...
 
NodeArray< double > m_estimate
 Rough estimate of circumference of subtrees. More...
 
double m_estimateFactor
 Weight of value (largestchild / number of children) added to estimate to compute radius. More...
 
bool m_evenAngles
 
NodeArray< double > m_maxChildRadius
 Outer radius of largest child. More...
 
NodeArray< double > m_oRadius
 Radius at node center. More...
 
NodeArray< nodem_parent
 Parent in spanning tree. More...
 
NodeArray< double > m_radius
 
node m_root
 Root of tree by selection method. More...
 
RootSelection m_rootSelection
 Defines how the tree root is selected. More...
 
NodeArray< double > m_size
 Radius of circle around node box. More...
 
TreeComputation m_treeComputation
 How to derive the spanning tree. More...
 
node m_treeRoot
 Root of tree after computation. More...
 

Detailed Description

Definition at line 56 of file BalloonLayout.h.

Member Enumeration Documentation

◆ ChildOrder

Enumerator
Fixed 
Optimized 

Definition at line 64 of file BalloonLayout.h.

◆ RootSelection

Enumerator
Center 
HighestDegree 

Definition at line 61 of file BalloonLayout.h.

◆ TreeComputation

Enumerator
Bfs 
Dfs 
BfsRandom 

Definition at line 66 of file BalloonLayout.h.

Constructor & Destructor Documentation

◆ BalloonLayout()

ogdf::BalloonLayout::BalloonLayout ( )

Constructor, sets options to default values.

Member Function Documentation

◆ call()

virtual void ogdf::BalloonLayout::call ( GraphAttributes AG)
overridevirtual

Standard call using the stored parameter settings.

Implements ogdf::LayoutModule.

◆ callFractal()

virtual void ogdf::BalloonLayout::callFractal ( GraphAttributes AG,
double  ratio = 0.3 
)
inlinevirtual

Call using special parameter settings for fractal model takes radius ratio < 0.5 as parameter.

Definition at line 78 of file BalloonLayout.h.

◆ check()

void ogdf::BalloonLayout::check ( Graph G)
private

Use even angles independent of subtree size.

◆ computeAngles()

void ogdf::BalloonLayout::computeAngles ( const Graph G)
protected

Computes the angle distribution: assigns m_angle each node.

◆ computeBFSTree()

void ogdf::BalloonLayout::computeBFSTree ( const Graph G,
node  v 
)
protected

Computes tree by BFS, fills m_parent and m_childCount.

◆ computeCoordinates()

void ogdf::BalloonLayout::computeCoordinates ( GraphAttributes AG)
protected

Computes coordinates from angles and radii.

◆ computeRadii()

void ogdf::BalloonLayout::computeRadii ( const GraphAttributes AG)
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.

◆ computeTree()

void ogdf::BalloonLayout::computeTree ( const Graph G)
protected

Computes the spanning tree that is used for the layout computation, the non-tree edges are simply added into the layout.

◆ getEvenAngles()

bool ogdf::BalloonLayout::getEvenAngles ( )
inline

returns how the angles are assigned to subtrees.

Definition at line 89 of file BalloonLayout.h.

◆ operator=()

BalloonLayout& ogdf::BalloonLayout::operator= ( const BalloonLayout bl)

Assignmentoperator.

◆ selectRoot()

void ogdf::BalloonLayout::selectRoot ( const Graph G)
protected

Selects the root of the spanning tree that is placed in the layout center.

◆ setEvenAngles()

void ogdf::BalloonLayout::setEvenAngles ( bool  b)
inline

Subtrees may be assigned even angles or angles depending on their size.

Definition at line 87 of file BalloonLayout.h.

Member Data Documentation

◆ m_angle

NodeArray<double> ogdf::BalloonLayout::m_angle
private

Angle assigned to nodes.

Definition at line 127 of file BalloonLayout.h.

◆ m_childCount

NodeArray<int> ogdf::BalloonLayout::m_childCount
private

Number of children in spanning tree.

Definition at line 126 of file BalloonLayout.h.

◆ m_childList

NodeArray< List<node> > ogdf::BalloonLayout::m_childList
private

Definition at line 131 of file BalloonLayout.h.

◆ m_childOrder

ChildOrder ogdf::BalloonLayout::m_childOrder
private

How to arrange the children.

Definition at line 144 of file BalloonLayout.h.

◆ m_estimate

NodeArray<double> ogdf::BalloonLayout::m_estimate
private

Rough estimate of circumference of subtrees.

Definition at line 128 of file BalloonLayout.h.

◆ m_estimateFactor

double ogdf::BalloonLayout::m_estimateFactor
private

Weight of value (largestchild / number of children) added to estimate to compute radius.

Definition at line 142 of file BalloonLayout.h.

◆ m_evenAngles

bool ogdf::BalloonLayout::m_evenAngles
private

Definition at line 146 of file BalloonLayout.h.

◆ m_maxChildRadius

NodeArray<double> ogdf::BalloonLayout::m_maxChildRadius
private

Outer radius of largest child.

Definition at line 124 of file BalloonLayout.h.

◆ m_oRadius

NodeArray<double> ogdf::BalloonLayout::m_oRadius
private

Radius at node center.

Outer radius enclosing all children.

Definition at line 123 of file BalloonLayout.h.

◆ m_parent

NodeArray<node> ogdf::BalloonLayout::m_parent
private

Parent in spanning tree.

Definition at line 125 of file BalloonLayout.h.

◆ m_radius

NodeArray<double> ogdf::BalloonLayout::m_radius
private

Definition at line 122 of file BalloonLayout.h.

◆ m_root

node ogdf::BalloonLayout::m_root
private

Root of tree by selection method.

Definition at line 140 of file BalloonLayout.h.

◆ m_rootSelection

RootSelection ogdf::BalloonLayout::m_rootSelection
private

Defines how the tree root is selected.

Definition at line 138 of file BalloonLayout.h.

◆ m_size

NodeArray<double> ogdf::BalloonLayout::m_size
private

Radius of circle around node box.

Definition at line 129 of file BalloonLayout.h.

◆ m_treeComputation

TreeComputation ogdf::BalloonLayout::m_treeComputation
private

How to derive the spanning tree.

Definition at line 145 of file BalloonLayout.h.

◆ m_treeRoot

node ogdf::BalloonLayout::m_treeRoot
private

Root of tree after computation.

Definition at line 139 of file BalloonLayout.h.


The documentation for this class was generated from the following file: