Open
Graph Drawing
Framework

 v.2010.10
 

Public Member Functions | Private Member Functions | Private Attributes | Friends

ogdf::Level Class Reference

Representation of levels in hierarchies. More...

#include <ogdf/layered/Level.h>

List of all members.

Public Member Functions

 Level (Hierarchy *pHierarchy, int index, int num)
 Creates a level with index index in hierarchy pHierarchy.
 ~Level ()
const nodeoperator[] (int i) const
 Returns the node at position i.
nodeoperator[] (int i)
 Returns the node at position i.
int size () const
 Returns the number of nodes on this level.
int high () const
 Returns the maximal array index (= size()-1).
int index () const
 Returns the array index of this level in the hierarchy.
const Array< node > & adjNodes (node v)
 Returns the (sorted) array of adjacent nodes of v (according to direction()).
const Hierarchyhierarchy () const
 Returns the hierarchy to which this level belongs.
void swap (int i, int j)
 Exchanges nodes at position i and j.
void sort (NodeArray< double > &weight)
 Sorts the nodes according to weight using quicksort.
void sort (NodeArray< int > &weight, int minBucket, int maxBucket)
 Sorts the nodes according to weight using bucket sort.
template<class C >
void sortOrder (C &orderComparer)
 Sorts the nodes according to orderComparer.
void recalcPos ()
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 getIsolatedNodes (SListPure< Tuple2< node, int > > &isolated)
void setIsolatedNodes (SListPure< Tuple2< node, int > > &isolated)

Private Attributes

Array< nodem_nodes
 The nodes on this level.
Hierarchym_pHierarchy
 The hierarchy to which this level belongs.
int m_index
 The index of this level.

Friends

class Hierarchy
class LayerBasedUPRLayout
class HierarchyLayoutModule
ostream & operator<< (ostream &os, const Level &L)

Detailed Description

Representation of levels in hierarchies.

See also:
Hierarchy, SugiyamaLayout

Definition at line 89 of file Level.h.


Constructor & Destructor Documentation

ogdf::Level::Level ( Hierarchy pHierarchy,
int  index,
int  num 
) [inline]

Creates a level with index index in hierarchy pHierarchy.

Parameters:
pHierarchy is a pointer to the hierarchy to which the created level will belong.
index is the index of the level.
num is the number of nodes on this level.

Definition at line 107 of file Level.h.

ogdf::Level::~Level (  )  [inline]

Definition at line 111 of file Level.h.


Member Function Documentation

const Array<node>& ogdf::Level::adjNodes ( node  v  ) 

Returns the (sorted) array of adjacent nodes of v (according to direction()).

void ogdf::Level::getIsolatedNodes ( SListPure< Tuple2< node, int > > &  isolated  )  [private]
const Hierarchy& ogdf::Level::hierarchy (  )  const [inline]

Returns the hierarchy to which this level belongs.

Definition at line 130 of file Level.h.

int ogdf::Level::high (  )  const [inline]

Returns the maximal array index (= size()-1).

Definition at line 121 of file Level.h.

int ogdf::Level::index (  )  const [inline]

Returns the array index of this level in the hierarchy.

Definition at line 124 of file Level.h.

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

Definition at line 158 of file Level.h.

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

Definition at line 158 of file Level.h.

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

Definition at line 158 of file Level.h.

const node& ogdf::Level::operator[] ( int  i  )  const [inline]

Returns the node at position i.

Definition at line 114 of file Level.h.

node& ogdf::Level::operator[] ( int  i  )  [inline]

Returns the node at position i.

Definition at line 116 of file Level.h.

void ogdf::Level::recalcPos (  ) 
void ogdf::Level::setIsolatedNodes ( SListPure< Tuple2< node, int > > &  isolated  )  [private]
int ogdf::Level::size (  )  const [inline]

Returns the number of nodes on this level.

Definition at line 119 of file Level.h.

void ogdf::Level::sort ( NodeArray< int > &  weight,
int  minBucket,
int  maxBucket 
)

Sorts the nodes according to weight using bucket sort.

void ogdf::Level::sort ( NodeArray< double > &  weight  ) 

Sorts the nodes according to weight using quicksort.

template<class C >
void ogdf::Level::sortOrder ( C &  orderComparer  )  [inline]

Sorts the nodes according to orderComparer.

Definition at line 142 of file Level.h.

void ogdf::Level::swap ( int  i,
int  j 
)

Exchanges nodes at position i and j.


Friends And Related Function Documentation

friend class Hierarchy [friend]

Definition at line 91 of file Level.h.

friend class HierarchyLayoutModule [friend]

Definition at line 93 of file Level.h.

friend class LayerBasedUPRLayout [friend]

Definition at line 92 of file Level.h.

ostream& operator<< ( ostream &  os,
const Level L 
) [friend]

Definition at line 149 of file Level.h.


Member Data Documentation

int ogdf::Level::m_index [private]

The index of this level.

Definition at line 97 of file Level.h.

The nodes on this level.

Definition at line 95 of file Level.h.

The hierarchy to which this level belongs.

Definition at line 96 of file Level.h.


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