Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::BalloonLayout Class Reference

#include <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 79 of file BalloonLayout.h.


Member Enumeration Documentation

enum ogdf::BalloonLayout::RootSelection

Enumerator:
rootCenter 
rootHighestDegree 

Definition at line 84 of file BalloonLayout.h.

enum ogdf::BalloonLayout::ChildOrder

Enumerator:
orderFixed 
orderOptimized 

Definition at line 87 of file BalloonLayout.h.

enum ogdf::BalloonLayout::TreeComputation

Enumerator:
treeBfs 
treeDfs 
treeBfsRandom 

Definition at line 89 of file BalloonLayout.h.


Constructor & Destructor Documentation

ogdf::BalloonLayout::BalloonLayout (  ) 

Constructor, sets options to default values.

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


Member Function Documentation

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

Assignmentoperator.

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 102 of file BalloonLayout.h.

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

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

Definition at line 111 of file BalloonLayout.h.

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

returns how the angles are assigned to subtrees.

Definition at line 113 of file BalloonLayout.h.

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.

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

Computes tree by BFS, fills m_parent and m_childCount.

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::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::computeAngles ( const Graph G  )  [protected]

Computes the angle distribution: assigns m_angle each node.

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

Computes coordinates from angles and radii.

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

Use even angles independent of subtree size.

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

Reimplemented from ogdf::LayoutModule.

Definition at line 176 of file BalloonLayout.h.

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

Reimplemented from ogdf::LayoutModule.

Definition at line 176 of file BalloonLayout.h.

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

Definition at line 176 of file BalloonLayout.h.


Member Data Documentation

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

Definition at line 144 of file BalloonLayout.h.

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

Radius at node center.

Outer radius enclosing all children.

Definition at line 145 of file BalloonLayout.h.

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

Outer radius of largest child.

Definition at line 146 of file BalloonLayout.h.

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

Parent in spanning tree.

Definition at line 147 of file BalloonLayout.h.

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

Number of children in spanning tree.

Definition at line 148 of file BalloonLayout.h.

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

Angle assigned to nodes.

Definition at line 149 of file BalloonLayout.h.

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

Rough estimate of circumference of subtrees.

Definition at line 150 of file BalloonLayout.h.

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

Radius of circle around node box.

Definition at line 151 of file BalloonLayout.h.

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

Definition at line 153 of file BalloonLayout.h.

RootSelection ogdf::BalloonLayout::m_rootSelection [private]

Defines how the tree root is selected.

Definition at line 162 of file BalloonLayout.h.

node ogdf::BalloonLayout::m_treeRoot [private]

Root of tree after computation.

Definition at line 163 of file BalloonLayout.h.

node ogdf::BalloonLayout::m_root [private]

Root of tree by selection method.

Definition at line 164 of file BalloonLayout.h.

double ogdf::BalloonLayout::m_estimateFactor [private]

Weight of value (largestchild/children) added to.

Definition at line 166 of file BalloonLayout.h.

double ogdf::BalloonLayout::m_fractalRatio [private]

Ratio of neighbor radii in fractal model.

Definition at line 168 of file BalloonLayout.h.

ChildOrder ogdf::BalloonLayout::m_childOrder [private]

How to arrange the children.

Definition at line 170 of file BalloonLayout.h.

TreeComputation ogdf::BalloonLayout::m_treeComputation [private]

How to derive the spanning tree.

Definition at line 171 of file BalloonLayout.h.

bool ogdf::BalloonLayout::m_evenAngles [private]

Definition at line 172 of file BalloonLayout.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:12 2007 by doxygen 1.5.4.