Representation of clusters in a clustered graph. More...
#include <ogdf/cluster/ClusterGraph.h>
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 () |
| ClusterElement * | succ () const |
| Returns the successor of the cluster in the list of all clusters. | |
| ClusterElement * | pred () const |
| Returns the predecessor of the cluster in the list of all clusters. | |
| ClusterElement * | pSucc () const |
| Returns the postorder successor of the cluster in the list of all clusters. | |
| ClusterElement * | pPred () 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< node > | nBegin () |
| Returns the first element in list of child nodes. | |
| ListConstIterator< node > | nBegin () const |
| Returns the first element in list of child nodes. | |
| int | nCount () |
| Returns the number of child nodes. | |
| ClusterElement * | parent () |
| Returns the parent of the cluster. | |
| ListConstIterator< adjEntry > | firstAdj () const |
| Returns the first adjacency entry in the list of outgoing edges. | |
| ListIterator< adjEntry > | firstAdj () |
| Returns the first adjacency entry in the list of outgoing edges. | |
| ListConstIterator< adjEntry > | lastAdj () const |
| Returns the last adjacency entry in the list of outgoing edges. | |
| ListIterator< adjEntry > | lastAdj () |
| 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< node > | m_entries |
| The nodes in this cluster. | |
| List< ClusterElement * > | m_children |
| The child clusters of this cluster. | |
| ClusterElement * | m_parent |
| The parent of this cluster. | |
| ClusterElement * | m_pPrev |
| The postorder predecessor of this cluster. | |
| ClusterElement * | m_pNext |
| The postorder successor of this cluster. | |
| ListIterator< ClusterElement * > | m_it |
| The position of this cluster within children list of its parent. | |
| List< adjEntry > | m_adjEntries |
| The adjacency list. | |
Friends | |
| class | ClusterGraph |
| class | GraphList< ClusterElement > |
Representation of clusters in a clustered graph.
Definition at line 75 of file ClusterGraph.h.
| ogdf::ClusterElement::ClusterElement | ( | int | id | ) | [inline] |
Creates a new cluster element.
Definition at line 129 of file ClusterGraph.h.
| 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.
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.
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.
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.
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.
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.
List<adjEntry> ogdf::ClusterElement::m_adjEntries [private] |
The adjacency list.
Definition at line 89 of file ClusterGraph.h.
List<ClusterElement*> ogdf::ClusterElement::m_children [private] |
The child clusters of this cluster.
Definition at line 83 of file ClusterGraph.h.
int ogdf::ClusterElement::m_depth [private] |
The depth of this cluster in the cluster tree.
Definition at line 81 of file ClusterGraph.h.
List<node> ogdf::ClusterElement::m_entries [private] |
The nodes in this cluster.
Definition at line 82 of file ClusterGraph.h.
int ogdf::ClusterElement::m_id [private] |
The index of this cluster.
Definition at line 80 of file ClusterGraph.h.
ListIterator<ClusterElement*> ogdf::ClusterElement::m_it [private] |
The position of this cluster within children list of its parent.
Definition at line 87 of file ClusterGraph.h.
ClusterElement* ogdf::ClusterElement::m_parent [private] |
The parent of this cluster.
Definition at line 84 of file ClusterGraph.h.
ClusterElement* ogdf::ClusterElement::m_pNext [private] |
The postorder successor of this cluster.
Definition at line 86 of file ClusterGraph.h.
ClusterElement* ogdf::ClusterElement::m_pPrev [private] |
The postorder predecessor of this cluster.
Definition at line 85 of file ClusterGraph.h.