Open
Graph Drawing
Framework

 v.2010.10
 

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

ogdf::ClusterElement Class Reference

Representation of clusters in a clustered graph. More...

#include <ogdf/cluster/ClusterGraph.h>

Inheritance diagram for ogdf::ClusterElement:
ogdf::GraphElement

List of all members.

Public Member Functions

 ClusterElement (int id)
 Creates a new cluster element.
int index () const
 Returns the (unique) index of the cluster.
int depth () const
 Returns the depth of the cluster in the cluster tree.
int & depth ()
ClusterElementsucc () const
 Returns the successor of the cluster in the list of all clusters.
ClusterElementpred () const
 Returns the predecessor of the cluster in the list of all clusters.
ClusterElementpSucc () const
 Returns the postorder successor of the cluster in the list of all clusters.
ClusterElementpPred () const
 Returns the postorder predecessor of the cluster in the list of all clusters.
ListConstIterator
< ClusterElement * > 
cBegin () const
 Returns the first element in the list of child clusters.
ListConstIterator
< ClusterElement * > 
crBegin () const
 Returns the last element in the list of child clusters.
int cCount ()
 Returns the number of child clusters.
ListIterator< nodenBegin ()
 Returns the first element in list of child nodes.
ListConstIterator< nodenBegin () const
 Returns the first element in list of child nodes.
int nCount ()
 Returns the number of child nodes.
ClusterElementparent ()
 Returns the parent of the cluster.
ListConstIterator< adjEntryfirstAdj () const
 Returns the first adjacency entry in the list of outgoing edges.
ListIterator< adjEntryfirstAdj ()
 Returns the first adjacency entry in the list of outgoing edges.
ListConstIterator< adjEntrylastAdj () const
 Returns the last adjacency entry in the list of outgoing edges.
ListIterator< adjEntrylastAdj ()
 Returns the last adjacency entry in the list of outgoing edges.
void getClusterNodes (List< node > &clusterNodes)
 Returns the list of nodes in the cluster, i.e., all nodes in the subtree rooted at this cluster.
int getClusterNodes (NodeArray< bool > &clusterNode)
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 init (List< node > &nodes)
List< ClusterElement * > & getChildren ()
List< node > & getNodes ()
void getClusterInducedNodes (List< node > &clusterNodes)
 Traverses the inclusion tree and adds nodes to clusterNodes.
void getClusterInducedNodes (NodeArray< bool > &clusterNode, int &num)

Private Attributes

int m_id
 The index of this cluster.
int m_depth
 The depth of this cluster in the cluster tree.
List< nodem_entries
 The nodes in this cluster.
List< ClusterElement * > m_children
 The child clusters of this cluster.
ClusterElementm_parent
 The parent of this cluster.
ClusterElementm_pPrev
 The postorder predecessor of this cluster.
ClusterElementm_pNext
 The postorder successor of this cluster.
ListIterator< ClusterElement * > m_it
 The position of this cluster within children list of its parent.
List< adjEntrym_adjEntries
 The adjacency list.

Friends

class ClusterGraph
class GraphList< ClusterElement >

Detailed Description

Representation of clusters in a clustered graph.

See also:
ClusterGraph

Definition at line 75 of file ClusterGraph.h.


Constructor & Destructor Documentation

ogdf::ClusterElement::ClusterElement ( int  id  )  [inline]

Creates a new cluster element.

Definition at line 129 of file ClusterGraph.h.


Member Function Documentation

ListConstIterator<ClusterElement*> ogdf::ClusterElement::cBegin (  )  const [inline]

Returns the first element in the list of child clusters.

Definition at line 157 of file ClusterGraph.h.

int ogdf::ClusterElement::cCount (  )  [inline]

Returns the number of child clusters.

Definition at line 161 of file ClusterGraph.h.

ListConstIterator<ClusterElement*> ogdf::ClusterElement::crBegin (  )  const [inline]

Returns the last element in the list of child clusters.

Definition at line 159 of file ClusterGraph.h.

int& ogdf::ClusterElement::depth (  )  [inline]

Definition at line 143 of file ClusterGraph.h.

int ogdf::ClusterElement::depth (  )  const [inline]

Returns the depth of the cluster in the cluster tree.

Definition at line 142 of file ClusterGraph.h.

ListConstIterator<adjEntry> ogdf::ClusterElement::firstAdj (  )  const [inline]

Returns the first adjacency entry in the list of outgoing edges.

Definition at line 174 of file ClusterGraph.h.

ListIterator<adjEntry> ogdf::ClusterElement::firstAdj (  )  [inline]

Returns the first adjacency entry in the list of outgoing edges.

Definition at line 176 of file ClusterGraph.h.

List<ClusterElement*>& ogdf::ClusterElement::getChildren (  )  [inline, private]

Definition at line 105 of file ClusterGraph.h.

void ogdf::ClusterElement::getClusterInducedNodes ( List< node > &  clusterNodes  )  [private]

Traverses the inclusion tree and adds nodes to clusterNodes.

Invoked by public function getClusterNodes(List<node> &clusterNodes).

void ogdf::ClusterElement::getClusterInducedNodes ( NodeArray< bool > &  clusterNode,
int &  num 
) [private]
int ogdf::ClusterElement::getClusterNodes ( NodeArray< bool > &  clusterNode  ) 

Sets the entry for each node v to true if v is a member of the subgraph induced by the ClusterElement. All other entries remain unchanged! Returns the number of entries set to true. Precondition: clusterNode is a NodeArray initialized on the clustergraph the ClusterElement belongs to.

void ogdf::ClusterElement::getClusterNodes ( List< node > &  clusterNodes  ) 

Returns the list of nodes in the cluster, i.e., all nodes in the subtree rooted at this cluster.

Recursively traverses the cluster tree starting at this cluster.

List<node>& ogdf::ClusterElement::getNodes (  )  [inline, private]

Definition at line 109 of file ClusterGraph.h.

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

Returns the (unique) index of the cluster.

Definition at line 140 of file ClusterGraph.h.

void ogdf::ClusterElement::init ( List< node > &  nodes  )  [inline, private]

Definition at line 100 of file ClusterGraph.h.

ListIterator<adjEntry> ogdf::ClusterElement::lastAdj (  )  [inline]

Returns the last adjacency entry in the list of outgoing edges.

Definition at line 180 of file ClusterGraph.h.

ListConstIterator<adjEntry> ogdf::ClusterElement::lastAdj (  )  const [inline]

Returns the last adjacency entry in the list of outgoing edges.

Definition at line 178 of file ClusterGraph.h.

ListIterator<node> ogdf::ClusterElement::nBegin (  )  [inline]

Returns the first element in list of child nodes.

Definition at line 163 of file ClusterGraph.h.

ListConstIterator<node> ogdf::ClusterElement::nBegin (  )  const [inline]

Returns the first element in list of child nodes.

Definition at line 165 of file ClusterGraph.h.

int ogdf::ClusterElement::nCount (  )  [inline]

Returns the number of child nodes.

Definition at line 167 of file ClusterGraph.h.

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

Reimplemented from ogdf::GraphElement.

Definition at line 195 of file ClusterGraph.h.

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

Reimplemented from ogdf::GraphElement.

Definition at line 195 of file ClusterGraph.h.

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

Reimplemented from ogdf::GraphElement.

Definition at line 195 of file ClusterGraph.h.

ClusterElement* ogdf::ClusterElement::parent (  )  [inline]

Returns the parent of the cluster.

Definition at line 170 of file ClusterGraph.h.

ClusterElement* ogdf::ClusterElement::pPred (  )  const [inline]

Returns the postorder predecessor of the cluster in the list of all clusters.

Definition at line 152 of file ClusterGraph.h.

ClusterElement* ogdf::ClusterElement::pred (  )  const [inline]

Returns the predecessor of the cluster in the list of all clusters.

Definition at line 147 of file ClusterGraph.h.

ClusterElement* ogdf::ClusterElement::pSucc (  )  const [inline]

Returns the postorder successor of the cluster in the list of all clusters.

Definition at line 150 of file ClusterGraph.h.

ClusterElement* ogdf::ClusterElement::succ (  )  const [inline]

Returns the successor of the cluster in the list of all clusters.

Definition at line 145 of file ClusterGraph.h.


Friends And Related Function Documentation

friend class ClusterGraph [friend]

Definition at line 77 of file ClusterGraph.h.

friend class GraphList< ClusterElement > [friend]

Definition at line 78 of file ClusterGraph.h.


Member Data Documentation

The adjacency list.

Definition at line 89 of file ClusterGraph.h.

The child clusters of this cluster.

Definition at line 83 of file ClusterGraph.h.

The depth of this cluster in the cluster tree.

Definition at line 81 of file ClusterGraph.h.

The nodes in this cluster.

Definition at line 82 of file ClusterGraph.h.

The index of this cluster.

Definition at line 80 of file ClusterGraph.h.

The position of this cluster within children list of its parent.

Definition at line 87 of file ClusterGraph.h.

The parent of this cluster.

Definition at line 84 of file ClusterGraph.h.

The postorder successor of this cluster.

Definition at line 86 of file ClusterGraph.h.

The postorder predecessor of this cluster.

Definition at line 85 of file ClusterGraph.h.


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