Open
Graph Drawing
Framework

 v.2010.10
 

Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ogdf::BalloonLayout Class Reference

#include <ogdf/misclayout/BalloonLayout.h>

Inheritance diagram for ogdf::BalloonLayout:
ogdf::LayoutModule

List of all members.

Public Types

enum  RootSelection { rootCenter, rootHighestDegree }
enum  ChildOrder { orderFixed, orderOptimized }
enum  TreeComputation { treeBfs, treeDfs, treeBfsRandom }

Public Member Functions

 BalloonLayout ()
 Constructor, sets options to default values.
virtual ~BalloonLayout ()
BalloonLayoutoperator= (const BalloonLayout &bl)
 Assignmentoperator.
virtual void call (GraphAttributes &AG)
 Standard call using the stored parameter settings.
virtual void callFractal (GraphAttributes &AG, double ratio=0.3)
void setEvenAngles (bool b)
 Subtrees may be assigned even angles or angles depending on their size.
bool getEvenAngles ()
 returns how the angles are assigned to subtrees.
void * operator new (size_t nBytes)
void * operator new (size_t, void *p)
void operator delete (void *p, size_t nBytes)

Protected Member Functions

void computeTree (const Graph &G)
void computeBFSTree (const Graph &G, node v)
 Computes tree by BFS, fills m_parent and m_childCount.
void selectRoot (const Graph &G)
void computeRadii (const GraphAttributes &AG)
void computeAngles (const Graph &G)
 Computes the angle distribution: assigns m_angle each node.
void computeCoordinates (GraphAttributes &AG)
 Computes coordinates from angles and radii.

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 81 of file BalloonLayout.h.


Member Enumeration Documentation

Enumerator:
orderFixed 
orderOptimized 

Definition at line 89 of file BalloonLayout.h.

Enumerator:
rootCenter 
rootHighestDegree 

Definition at line 86 of file BalloonLayout.h.

Enumerator:
treeBfs 
treeDfs 
treeBfsRandom 

Definition at line 91 of file BalloonLayout.h.


Constructor & Destructor Documentation

ogdf::BalloonLayout::BalloonLayout (  ) 

Constructor, sets options to default values.

virtual ogdf::BalloonLayout::~BalloonLayout (  )  [virtual]

Member Function Documentation

virtual void ogdf::BalloonLayout::call ( GraphAttributes AG  )  [virtual]

Standard call using the stored parameter settings.

Implements ogdf::LayoutModule.

virtual void ogdf::BalloonLayout::callFractal ( GraphAttributes AG,
double  ratio = 0.3 
) [inline, virtual]

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

Definition at line 104 of file BalloonLayout.h.

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

Use even angles independent of subtree size.

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

Computes the angle distribution: assigns m_angle each node.

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

Computes tree by BFS, fills m_parent and m_childCount.

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

Computes coordinates from angles and radii.

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.

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.

bool ogdf::BalloonLayout::getEvenAngles (  )  [inline]

returns how the angles are assigned to subtrees.

Definition at line 115 of file BalloonLayout.h.

void ogdf::BalloonLayout::operator delete ( void *  p,
size_t  nBytes 
) [inline]

Reimplemented from ogdf::LayoutModule.

Definition at line 178 of file BalloonLayout.h.

void* ogdf::BalloonLayout::operator new ( size_t  nBytes  )  [inline]

Reimplemented from ogdf::LayoutModule.

Definition at line 178 of file BalloonLayout.h.

void* ogdf::BalloonLayout::operator new ( size_t  ,
void *  p 
) [inline]

Reimplemented from ogdf::LayoutModule.

Definition at line 178 of file BalloonLayout.h.

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

Assignmentoperator.

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

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

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

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

Definition at line 113 of file BalloonLayout.h.


Member Data Documentation

Angle assigned to nodes.

Definition at line 151 of file BalloonLayout.h.

Number of children in spanning tree.

Definition at line 150 of file BalloonLayout.h.

Definition at line 155 of file BalloonLayout.h.

How to arrange the children.

Definition at line 172 of file BalloonLayout.h.

Rough estimate of circumference of subtrees.

Definition at line 152 of file BalloonLayout.h.

Weight of value (largestchild/children) added to.

Definition at line 168 of file BalloonLayout.h.

Definition at line 174 of file BalloonLayout.h.

Ratio of neighbor radii in fractal model.

Definition at line 170 of file BalloonLayout.h.

Outer radius of largest child.

Definition at line 148 of file BalloonLayout.h.

Radius at node center.

Outer radius enclosing all children.

Definition at line 147 of file BalloonLayout.h.

Parent in spanning tree.

Definition at line 149 of file BalloonLayout.h.

Definition at line 146 of file BalloonLayout.h.

Root of tree by selection method.

Definition at line 166 of file BalloonLayout.h.

Defines how the tree root is selected.

Definition at line 164 of file BalloonLayout.h.

Radius of circle around node box.

Definition at line 153 of file BalloonLayout.h.

How to derive the spanning tree.

Definition at line 173 of file BalloonLayout.h.

Root of tree after computation.

Definition at line 165 of file BalloonLayout.h.


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