Representation of clusters in a clustered graph. More...
#include <ogdf/cluster/ClusterGraph.h>
Public Member Functions | |
Access methods | |
int | index () const |
Returns the (unique) index of the cluster. More... | |
int | depth () const |
Returns the depth of the cluster in the cluster tree. More... | |
cluster | parent () |
Returns the parent of the cluster. More... | |
cluster | succ () const |
Returns the successor of the cluster in the list of all clusters. More... | |
cluster | pred () const |
Returns the predecessor of the cluster in the list of all clusters. More... | |
cluster | pSucc () const |
Returns the postorder successor of the cluster in the list of all clusters. More... | |
cluster | pPred () const |
Returns the postorder predecessor of the cluster in the list of all clusters. More... | |
void | getClusterNodes (List< node > &clusterNodes) |
Returns the list of nodes in the cluster, i.e., all nodes in the subtree rooted at this cluster. More... | |
int | 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. More... | |
Private Attributes | |
int | m_depth |
The depth of this cluster in the cluster tree. More... | |
int | m_id |
The index of this cluster. More... | |
![]() | |
GraphElement * | m_next = nullptr |
The successor in the list. More... | |
GraphElement * | m_prev = nullptr |
The predecessor in the list. More... | |
Friends | |
class | ClusterGraph |
class | internal::GraphList< ClusterElement > |
Graph object containers | |
These containers maintain the nodes and child clusters of the cluster, and provide iterators. If computed they also provide access to the sorted list of adjacency entries of edges leaving the cluster. | |
cluster | m_parent |
The parent of this cluster. More... | |
cluster | m_pPrev |
The postorder predecessor of this cluster. More... | |
cluster | m_pNext |
The postorder successor of this cluster. More... | |
ListIterator< cluster > | m_it |
The position of this cluster within the children list of its parent. More... | |
ListContainer< node, ClusterElement > | nodes |
The container containing the nodes lying (directly) in this cluster. More... | |
ListContainer< cluster, ClusterElement > | children |
The container containing the child clusters (children in the cluster tree) of this cluster. More... | |
ListContainer< adjEntry, ClusterElement > | adjEntries |
The container containing the sorted list of adjacency entries of edges leaving this cluster. More... | |
List< cluster > & | getChildren () |
Provides access to the encapsulated list of children (for friends of ClusterElement). More... | |
List< node > & | getNodes () |
Provides access to the encapsulated list of nodes (for friends of ClusterElement). More... | |
List< adjEntry > & | getAdjEntries () |
Provides access to the encapsulated list of adjacency entries (for friends of ClusterElement). More... | |
void | getClusterInducedNodes (List< node > &clusterNodes) |
Traverses the inclusion tree and adds nodes to clusterNodes . More... | |
void | getClusterInducedNodes (NodeArray< bool > &clusterNode, int &num) |
ClusterElement (int id) | |
Creates a new cluster element. More... | |
Iteration over tree structure | |
Alternatively you can use the containers ClusterElement::nodes, ClusterElement::children and ClusterElement::adjEntries directly. | |
ListConstIterator< ClusterElement * > | cBegin () const |
Returns the first element in the list of child clusters. More... | |
ListConstIterator< ClusterElement * > | crBegin () const |
Returns the last element in the list of child clusters. More... | |
int | cCount () |
Returns the number of child clusters. More... | |
ListConstIterator< node > | nBegin () const |
Returns the first element in list of child nodes. More... | |
int | nCount () |
Returns the number of child nodes. More... | |
ListConstIterator< adjEntry > | firstAdj () const |
Returns the first adjacency entry in the list of outgoing edges. More... | |
ListConstIterator< adjEntry > | lastAdj () const |
Returns the last adjacency entry in the list of outgoing edges. More... | |
static int | compare (const ClusterElement &x, const ClusterElement &y) |
Standard Comparer (uses cluster indices). More... | |
Representation of clusters in a clustered graph.
Definition at line 53 of file ClusterGraph.h.
|
inlineexplicit |
Creates a new cluster element.
Definition at line 128 of file ClusterGraph.h.
|
inline |
Returns the first element in the list of child clusters.
Definition at line 193 of file ClusterGraph.h.
|
inline |
Returns the number of child clusters.
Definition at line 199 of file ClusterGraph.h.
|
inlinestatic |
Standard Comparer (uses cluster indices).
Definition at line 217 of file ClusterGraph.h.
|
inline |
Returns the last element in the list of child clusters.
Definition at line 196 of file ClusterGraph.h.
|
inline |
Returns the depth of the cluster in the cluster tree.
Definition at line 147 of file ClusterGraph.h.
|
inline |
Returns the first adjacency entry in the list of outgoing edges.
Definition at line 209 of file ClusterGraph.h.
Provides access to the encapsulated list of adjacency entries (for friends of ClusterElement).
Definition at line 108 of file ClusterGraph.h.
Provides access to the encapsulated list of children (for friends of ClusterElement).
Definition at line 98 of file ClusterGraph.h.
Traverses the inclusion tree and adds nodes to clusterNodes
.
Invoked by public function getClusterNodes(List<node> &clusterNodes).
|
private |
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 168 of file ClusterGraph.h.
|
inline |
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!
clusterNode
is a NodeArray initialized on the clustergraph this ClusterElement belongs to. Definition at line 179 of file ClusterGraph.h.
Provides access to the encapsulated list of nodes (for friends of ClusterElement).
Definition at line 103 of file ClusterGraph.h.
|
inline |
Returns the (unique) index of the cluster.
Definition at line 144 of file ClusterGraph.h.
|
inline |
Returns the last adjacency entry in the list of outgoing edges.
Definition at line 212 of file ClusterGraph.h.
|
inline |
Returns the first element in list of child nodes.
Definition at line 202 of file ClusterGraph.h.
|
inline |
Returns the number of child nodes.
Definition at line 205 of file ClusterGraph.h.
|
inline |
Returns the parent of the cluster.
Definition at line 150 of file ClusterGraph.h.
|
inline |
Returns the postorder predecessor of the cluster in the list of all clusters.
Definition at line 162 of file ClusterGraph.h.
|
inline |
Returns the predecessor of the cluster in the list of all clusters.
Definition at line 156 of file ClusterGraph.h.
|
inline |
Returns the postorder successor of the cluster in the list of all clusters.
Definition at line 159 of file ClusterGraph.h.
|
inline |
Returns the successor of the cluster in the list of all clusters.
Definition at line 153 of file ClusterGraph.h.
|
friend |
Definition at line 55 of file ClusterGraph.h.
|
friend |
Definition at line 56 of file ClusterGraph.h.
ListContainer<adjEntry, ClusterElement> ogdf::ClusterElement::adjEntries |
The container containing the sorted list of adjacency entries of edges leaving this cluster.
This list is only available (i.e., non-empty) if explicitly computed (e.g., by a cluster-planar embedding algorithm).
Definition at line 80 of file ClusterGraph.h.
ListContainer<cluster, ClusterElement> ogdf::ClusterElement::children |
The container containing the child clusters (children in the cluster tree) of this cluster.
Definition at line 74 of file ClusterGraph.h.
|
private |
The depth of this cluster in the cluster tree.
Definition at line 59 of file ClusterGraph.h.
|
private |
The index of this cluster.
Definition at line 58 of file ClusterGraph.h.
|
private |
The position of this cluster within the children list of its parent.
Definition at line 89 of file ClusterGraph.h.
|
private |
The parent of this cluster.
Definition at line 86 of file ClusterGraph.h.
|
private |
The postorder successor of this cluster.
Definition at line 88 of file ClusterGraph.h.
|
private |
The postorder predecessor of this cluster.
Definition at line 87 of file ClusterGraph.h.
ListContainer<node, ClusterElement> ogdf::ClusterElement::nodes |
The container containing the nodes lying (directly) in this cluster.
Definition at line 71 of file ClusterGraph.h.