Open
Graph Drawing
Framework

 v.2010.10
 

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes

ogdf::RadialTreeLayout Class Reference

The radial tree layout algorithm. More...

#include <ogdf/tree/RadialTreeLayout.h>

Inheritance diagram for ogdf::RadialTreeLayout:
ogdf::LayoutModule

List of all members.

Classes

struct  Group
class  Grouping

Public Types

enum  RootSelectionType { rootIsSource, rootIsSink, rootIsCenter }
 

Selection strategies for root of the tree.

More...

Public Member Functions

 RadialTreeLayout ()
 Creates an instance of radial tree layout and sets options to default values.
 RadialTreeLayout (const RadialTreeLayout &tl)
 Copy constructor.
 ~RadialTreeLayout ()
RadialTreeLayoutoperator= (const RadialTreeLayout &tl)
 Assignment operator.
void call (GraphAttributes &GA)
 Calls the algorithm for graph attributes GA.
double levelDistance () const
 Returns the option levelDistance.
void levelDistance (double x)
 Sets the option levelDistance to x.
double connectedComponentDistance () const
 Returns the option connectedComponentDistance.
void connectedComponentDistance (double x)
 Sets the option connectedComponentDistance to x.
RootSelectionType rootSelection () const
 Returns the option rootSelection.
void rootSelection (RootSelectionType sel)
 Sets the option rootSelection to sel.
const NodeArray< double > & diameter () const
const NodeArray< double > & leaves () const
void * operator new (size_t nBytes)
void * operator new (size_t, void *p)
void operator delete (void *p, size_t nBytes)

Private Member Functions

void FindRoot (const Graph &G)
void ComputeLevels (const Graph &G)
void ComputeDiameters (GraphAttributes &AG)
void ComputeAngles (const Graph &G)
void ComputeCoordinates (GraphAttributes &AG)
void ComputeGrouping (int i)

Private Attributes

double m_levelDistance
 The minimal distance between levels.
double m_connectedComponentDistance
 The minimal distance between trees.
RootSelectionType m_selectRoot
 Specifies how to determine the root.
node m_root
 The root of the tree.
int m_numLevels
 The number of levels (root is on level 0).
NodeArray< int > m_level
 The level of a node.
NodeArray< nodem_parent
 The parent of a node (0 if root).
NodeArray< double > m_leaves
 The weighted number of leaves in subtree.
Array< SListPure< node > > m_nodes
 The nodes at a level.
NodeArray< double > m_angle
 The angle of node center (for placement).
NodeArray< double > m_wedge
 The wedge reserved for subtree.
NodeArray< double > m_diameter
 The diameter of a circle bounding a node.
Array< double > m_width
 The width of a circle.
Array< double > m_radius
 The width of a level.
double m_outerRadius
 The radius of circle bounding the drawing.
NodeArray< Groupingm_grouping

Detailed Description

The radial tree layout algorithm.

Optional parameters

Radial tree layout provides the following optional parameters.

OptionTypeDefaultDescription
levelDistancedouble50.0 The minimal vertical distance required between levels.
connectedComponentDistancedouble50.0 The minimal horizontal distance required between trees in the forest.
rootSelectionRootSelectionType rootIsCenter Specifies how to select the root of the tree.

Definition at line 91 of file RadialTreeLayout.h.


Member Enumeration Documentation

Selection strategies for root of the tree.

Enumerator:
rootIsSource 

Select a source in the graph.

rootIsSink 

Select a sink in the graph.

rootIsCenter 

Select the center of the tree.

Definition at line 95 of file RadialTreeLayout.h.


Constructor & Destructor Documentation

ogdf::RadialTreeLayout::RadialTreeLayout (  ) 

Creates an instance of radial tree layout and sets options to default values.

ogdf::RadialTreeLayout::RadialTreeLayout ( const RadialTreeLayout tl  ) 

Copy constructor.

ogdf::RadialTreeLayout::~RadialTreeLayout (  ) 

Member Function Documentation

void ogdf::RadialTreeLayout::call ( GraphAttributes GA  )  [virtual]

Calls the algorithm for graph attributes GA.

The algorithm preserve the order of children which is given by the adjacency lists.

Precondition:
The graph is a tree.
Parameters:
GA represents the input graph and is assigned the computed layout.

Implements ogdf::LayoutModule.

void ogdf::RadialTreeLayout::ComputeAngles ( const Graph G  )  [private]
void ogdf::RadialTreeLayout::ComputeCoordinates ( GraphAttributes AG  )  [private]
void ogdf::RadialTreeLayout::ComputeDiameters ( GraphAttributes AG  )  [private]
void ogdf::RadialTreeLayout::ComputeGrouping ( int  i  )  [private]
void ogdf::RadialTreeLayout::ComputeLevels ( const Graph G  )  [private]
double ogdf::RadialTreeLayout::connectedComponentDistance (  )  const [inline]

Returns the option connectedComponentDistance.

Definition at line 204 of file RadialTreeLayout.h.

void ogdf::RadialTreeLayout::connectedComponentDistance ( double  x  )  [inline]

Sets the option connectedComponentDistance to x.

Definition at line 207 of file RadialTreeLayout.h.

const NodeArray<double>& ogdf::RadialTreeLayout::diameter (  )  const [inline]

Definition at line 217 of file RadialTreeLayout.h.

void ogdf::RadialTreeLayout::FindRoot ( const Graph G  )  [private]
const NodeArray<double>& ogdf::RadialTreeLayout::leaves (  )  const [inline]

Definition at line 218 of file RadialTreeLayout.h.

void ogdf::RadialTreeLayout::levelDistance ( double  x  )  [inline]

Sets the option levelDistance to x.

Definition at line 198 of file RadialTreeLayout.h.

double ogdf::RadialTreeLayout::levelDistance (  )  const [inline]

Returns the option levelDistance.

Definition at line 195 of file RadialTreeLayout.h.

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

Reimplemented from ogdf::LayoutModule.

Definition at line 228 of file RadialTreeLayout.h.

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

Reimplemented from ogdf::LayoutModule.

Definition at line 228 of file RadialTreeLayout.h.

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

Reimplemented from ogdf::LayoutModule.

Definition at line 228 of file RadialTreeLayout.h.

RadialTreeLayout& ogdf::RadialTreeLayout::operator= ( const RadialTreeLayout tl  ) 

Assignment operator.

void ogdf::RadialTreeLayout::rootSelection ( RootSelectionType  sel  )  [inline]

Sets the option rootSelection to sel.

Definition at line 215 of file RadialTreeLayout.h.

RootSelectionType ogdf::RadialTreeLayout::rootSelection (  )  const [inline]

Returns the option rootSelection.

Definition at line 212 of file RadialTreeLayout.h.


Member Data Documentation

The angle of node center (for placement).

Definition at line 115 of file RadialTreeLayout.h.

The minimal distance between trees.

Definition at line 103 of file RadialTreeLayout.h.

The diameter of a circle bounding a node.

Definition at line 118 of file RadialTreeLayout.h.

The weighted number of leaves in subtree.

Definition at line 112 of file RadialTreeLayout.h.

The level of a node.

Definition at line 110 of file RadialTreeLayout.h.

The minimal distance between levels.

Definition at line 102 of file RadialTreeLayout.h.

The nodes at a level.

Definition at line 113 of file RadialTreeLayout.h.

The number of levels (root is on level 0).

Definition at line 109 of file RadialTreeLayout.h.

The radius of circle bounding the drawing.

Definition at line 122 of file RadialTreeLayout.h.

The parent of a node (0 if root).

Definition at line 111 of file RadialTreeLayout.h.

The width of a level.

Definition at line 121 of file RadialTreeLayout.h.

The root of the tree.

Definition at line 107 of file RadialTreeLayout.h.

Specifies how to determine the root.

Definition at line 105 of file RadialTreeLayout.h.

The wedge reserved for subtree.

Definition at line 116 of file RadialTreeLayout.h.

The width of a circle.

Definition at line 119 of file RadialTreeLayout.h.


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