Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::BalloonLayout Class Reference

#include <ogdf/misclayout/BalloonLayout.h>

+ Inheritance diagram for ogdf::BalloonLayout:

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.
 
BalloonLayoutoperator= (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< doublem_angle
 Angle assigned to nodes.
 
NodeArray< intm_childCount
 Number of children in spanning tree.
 
NodeArray< List< node > > m_childList
 
ChildOrder m_childOrder
 How to arrange the children.
 
NodeArray< doublem_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< doublem_maxChildRadius
 Outer radius of largest child.
 
NodeArray< doublem_oRadius
 Radius at node center.
 
NodeArray< nodem_parent
 Parent in spanning tree.
 
NodeArray< doublem_radius
 
node m_root
 Root of tree by selection method.
 
RootSelection m_rootSelection
 Defines how the tree root is selected.
 
NodeArray< doublem_size
 Radius of circle around node box.
 
TreeComputation m_treeComputation
 How to derive the spanning tree.
 
node m_treeRoot
 Root of tree after computation.
 

Detailed Description

Definition at line 56 of file BalloonLayout.h.

Member Enumeration Documentation

◆ ChildOrder

Enumerator
Fixed 
Optimized 

Definition at line 63 of file BalloonLayout.h.

◆ RootSelection

Enumerator
Center 
HighestDegree 

Definition at line 60 of file BalloonLayout.h.

◆ TreeComputation

Enumerator
Bfs 
Dfs 
BfsRandom 

Definition at line 65 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 77 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 88 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 85 of file BalloonLayout.h.

Member Data Documentation

◆ m_angle

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

Angle assigned to nodes.

Definition at line 126 of file BalloonLayout.h.

◆ m_childCount

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

Number of children in spanning tree.

Definition at line 125 of file BalloonLayout.h.

◆ m_childList

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

Definition at line 130 of file BalloonLayout.h.

◆ m_childOrder

ChildOrder ogdf::BalloonLayout::m_childOrder
private

How to arrange the children.

Definition at line 143 of file BalloonLayout.h.

◆ m_estimate

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

Rough estimate of circumference of subtrees.

Definition at line 127 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 141 of file BalloonLayout.h.

◆ m_evenAngles

bool ogdf::BalloonLayout::m_evenAngles
private

Definition at line 145 of file BalloonLayout.h.

◆ m_maxChildRadius

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

Outer radius of largest child.

Definition at line 123 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 122 of file BalloonLayout.h.

◆ m_parent

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

Parent in spanning tree.

Definition at line 124 of file BalloonLayout.h.

◆ m_radius

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

Definition at line 121 of file BalloonLayout.h.

◆ m_root

node ogdf::BalloonLayout::m_root
private

Root of tree by selection method.

Definition at line 139 of file BalloonLayout.h.

◆ m_rootSelection

RootSelection ogdf::BalloonLayout::m_rootSelection
private

Defines how the tree root is selected.

Definition at line 137 of file BalloonLayout.h.

◆ m_size

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

Radius of circle around node box.

Definition at line 128 of file BalloonLayout.h.

◆ m_treeComputation

TreeComputation ogdf::BalloonLayout::m_treeComputation
private

How to derive the spanning tree.

Definition at line 144 of file BalloonLayout.h.

◆ m_treeRoot

node ogdf::BalloonLayout::m_treeRoot
private

Root of tree after computation.

Definition at line 138 of file BalloonLayout.h.


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