Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::ClusterGraphCopy Class Reference

#include <ogdf/layered/ExtendedNestingGraph.h>

+ Inheritance diagram for ogdf::ClusterGraphCopy:

Public Member Functions

 ClusterGraphCopy ()
 
 ClusterGraphCopy (const ExtendedNestingGraph &H, const ClusterGraph &CG)
 
cluster copy (cluster cOrig) const
 
const ClusterGraphgetOriginalClusterGraph () const
 
void init (const ExtendedNestingGraph &H, const ClusterGraph &CG)
 
cluster original (cluster cCopy) const
 
void setParent (node v, cluster c)
 
- Public Member Functions inherited from ogdf::ClusterGraph
cluster rootCluster () const
 Returns the root cluster. More...
 
int numberOfClusters () const
 Returns the number of clusters. More...
 
int maxClusterIndex () const
 Returns the maximal used cluster index. More...
 
int clusterArrayTableSize () const
 Returns the table size of cluster arrays associated with this graph. More...
 
cluster clusterOf (node v) const
 Returns the cluster to which a node belongs. More...
 
int & clusterDepth (cluster c) const
 Returns depth of cluster c in cluster tree, starting with root depth 1. More...
 
cluster firstCluster () const
 Returns the first cluster in the list of all clusters. More...
 
cluster lastCluster () const
 Returns the last cluster in the list of all cluster. More...
 
cluster firstPostOrderCluster () const
 Returns the first cluster in the list of post ordered clusters. More...
 
template<class CLUSTERLIST >
void allClusters (CLUSTERLIST &clusterList) const
 Returns the list of all clusters in clusterList. More...
 
void clear ()
 Removes all clusters except for the root cluster. More...
 
void init (const Graph &G)
 Clears all cluster data and then reinitializes the instance with underlying graph G. More...
 
void clearClusterTree (cluster C)
 Removes all clusters from the cluster subtree rooted at cluster C except for cluster C itself. More...
 
cluster newCluster (cluster parent, int id=-1)
 Inserts a new cluster; makes it a child of the cluster parent. More...
 
cluster createEmptyCluster (const cluster parent=nullptr, int clusterId=-1)
 Creates an empty cluster with index clusterId and parent parent. More...
 
cluster createCluster (SList< node > &nodes, const cluster parent=nullptr)
 Creates a new cluster containing the nodes given by nodes; makes it a child of the cluster parent. More...
 
void delCluster (cluster c)
 Deletes cluster c. More...
 
void moveCluster (cluster c, cluster newParent)
 Moves cluster c to a new parent newParent. More...
 
void reassignNode (node v, cluster c)
 Reassigns node v to cluster c. More...
 
void reInit (Graph &G)
 Clear cluster info structure, reinitializes with underlying graph G. More...
 
template<class NODELIST >
void collapse (NODELIST &nodes, Graph &G)
 Collapses all nodes in the list nodes to the first node; multi-edges are removed. More...
 
void setUpdateDepth (bool b) const
 Turns automatic update of node depth values on or off. More...
 
void pullUpSubTree (cluster c)
 Updates depth information in subtree after delCluster. More...
 
int treeDepth () const
 Computes depth of cluster tree, running time O(C). More...
 
void computeSubTreeDepth (cluster c) const
 Computes depth of cluster tree hanging at c. More...
 
cluster commonCluster (SList< node > &nodes)
 Returns lowest common cluster of nodes in list nodes. More...
 
cluster commonCluster (node v, node w) const
 Returns the lowest common cluster of v and w in the cluster tree. More...
 
cluster commonClusterLastAncestors (node v, node w, cluster &c1, cluster &c2) const
 Returns the lowest common cluster lca and the highest ancestors on the path to lca. More...
 
cluster commonClusterPath (node v, node w, List< cluster > &eL) const
 Returns lca of v and w and stores corresponding path in eL. More...
 
cluster commonClusterAncestorsPath (node v, node w, cluster &c1, cluster &c2, List< cluster > &eL) const
 Returns lca of v and w, stores corresponding path in eL and ancestors in c1, c2. More...
 
void emptyClusters (SList< cluster > &emptyCluster, SList< cluster > *checkCluster=nullptr)
 Returns the list of clusters that are empty or only contain empty clusters. More...
 
bool emptyOnNodeDelete (cluster c)
 Returns true if cluster c has only one node and no children. More...
 
bool emptyOnClusterDelete (cluster c)
 Returns true if cluster c has only one child and no nodes. More...
 
template<class EDGELIST >
void adjEdges (cluster c, EDGELIST &edges) const
 Returns the list of all edges adjacent to cluster c in edges. More...
 
template<class ADJLIST >
void adjEntries (cluster c, ADJLIST &entries) const
 Returns the list of all adjacency entries adjacent to cluster c in entries. More...
 
template<class LISTITERATOR >
void makeAdjEntries (cluster c, LISTITERATOR start)
 Computes the adjacency entry list for cluster c. More...
 
void adjAvailable (bool val)
 Sets the availability status of the adjacency entries. More...
 
bool representsCombEmbedding () const
 Checks the combinatorial cluster planar embedding. More...
 
ListIterator< ClusterArrayBase * > registerArray (ClusterArrayBase *pClusterArray) const
 Registers a cluster array. More...
 
void unregisterArray (ListIterator< ClusterArrayBase * > it) const
 Unregisters a cluster array. More...
 
void moveRegisterArray (ListIterator< ClusterArrayBase * > it, ClusterArrayBase *pClusterArray) const
 Move the registration it of a cluster array to pClusterArray (used with move semantics for cluster arrays). More...
 
ListIterator< ClusterGraphObserver * > registerObserver (ClusterGraphObserver *pObserver) const
 Registers a cluster graph observer. More...
 
void unregisterObserver (ListIterator< ClusterGraphObserver * > it) const
 Unregisters a cluster graph observer. More...
 
 ClusterGraph ()
 Creates a cluster graph associated with no graph. More...
 
 ClusterGraph (const Graph &G)
 Creates a cluster graph associated with graph G. More...
 
 ClusterGraph (const ClusterGraph &C)
 Copy constructor. More...
 
 ClusterGraph (const ClusterGraph &C, Graph &G)
 Copies the underlying graph of C into G and constructs a copy of C associated with G. More...
 
 ClusterGraph (const ClusterGraph &C, Graph &G, ClusterArray< cluster > &originalClusterTable, NodeArray< node > &originalNodeTable)
 Copies the underlying graph of C into G and constructs a copy of C associated with G. More...
 
 ClusterGraph (const ClusterGraph &C, Graph &G, ClusterArray< cluster > &originalClusterTable, NodeArray< node > &originalNodeTable, EdgeArray< edge > &edgeCopy)
 Copies the underlying graph of C into G and constructs a copy of C associated with G. More...
 
virtual ~ClusterGraph ()
 Destructor. More...
 
 operator const Graph & () const
 Conversion to const Graph reference (to underlying graph). More...
 
const GraphconstGraph () const
 Returns a reference to the underlying graph. More...
 
ClusterGraphoperator= (const ClusterGraph &C)
 Assignment operator. More...
 
- Public Member Functions inherited from ogdf::GraphObserver
 GraphObserver ()
 Constructs instance of GraphObserver class. More...
 
 GraphObserver (const Graph *G)
 Constructs instance of GraphObserver class. More...
 
virtual ~GraphObserver ()
 Destroys the instance, unregisters it from watched graph. More...
 
const GraphgetGraph () const
 
void reregister (const Graph *pG)
 Associates observer instance with graph G. More...
 

Private Member Functions

void createClusterTree (cluster cOrig)
 

Private Attributes

ClusterArray< clusterm_copy
 
ClusterArray< clusterm_original
 
const ClusterGraphm_pCG
 
const ExtendedNestingGraphm_pH
 

Additional Inherited Members

- Public Types inherited from ogdf::ClusterGraph
using cluster_iterator = internal::GraphIterator< cluster >
 Provides a bidirectional iterator to a cluster in a clustered graph. More...
 
- Public Attributes inherited from ogdf::ClusterGraph
internal::GraphObjectContainer< ClusterElementclusters
 The container containing all cluster objects. More...
 
- Protected Member Functions inherited from ogdf::ClusterGraph
virtual void nodeDeleted (node v) override
 Implementation of inherited method: Updates data if node deleted. More...
 
virtual void nodeAdded (node v) override
 Implementation of inherited method: Updates data if node added. More...
 
virtual void edgeDeleted (edge) override
 Implementation of inherited method: Updates data if edge deleted. More...
 
virtual void edgeAdded (edge) override
 Implementation of inherited method: Updates data if edge added. More...
 
virtual void reInit () override
 Currently does nothing. More...
 
virtual void cleared () override
 Clears cluster data without deleting root when underlying graphs' clear method is called. More...
 
cluster doCreateCluster (SList< node > &nodes, const cluster parent, int clusterId=-1)
 Creates new cluster containing nodes in parameter list with index clusterId. More...
 
cluster doCreateCluster (SList< node > &nodes, SList< cluster > &emptyCluster, const cluster parent, int clusterId=-1)
 Creates new cluster containing nodes in parameter list and stores resulting empty clusters in list, cluster has index clusterId. More...
 
void doClear ()
 Clears all cluster data. More...
 
void copyLCA (const ClusterGraph &C)
 Copies lowest common ancestor info to copy of clustered graph. More...
 
void updatePostOrder (cluster c, cluster oldParent, cluster newParent)
 Adjusts the post order structure for moved clusters. More...
 
cluster postOrderPredecessor (cluster c) const
 Computes new predecessor for subtree at moved cluster c (nullptr if c is the root). More...
 
cluster leftMostCluster (cluster c) const
 Leftmost cluster in subtree rooted at c, gets predecessor of subtree. More...
 
- Protected Attributes inherited from ogdf::ClusterGraph
ClusterArray< int > * m_lcaSearch
 Used to save last search run number for commoncluster. More...
 
int m_lcaNumber
 Used to save last search run number for commoncluster. More...
 
ClusterArray< cluster > * m_vAncestor
 Used to save last search run number for commoncluster. More...
 
ClusterArray< cluster > * m_wAncestor
 Used to save last search run number for commoncluster. More...
 
bool m_updateDepth
 Depth of clusters is always updated if set to true. More...
 
bool m_depthUpToDate
 Status of cluster depth information. More...
 
- Protected Attributes inherited from ogdf::GraphObserver
ListIterator< GraphObserver * > m_itGList
 watched graph More...
 
const Graphm_pGraph
 

Detailed Description

Definition at line 258 of file ExtendedNestingGraph.h.

Constructor & Destructor Documentation

◆ ClusterGraphCopy() [1/2]

ogdf::ClusterGraphCopy::ClusterGraphCopy ( )

◆ ClusterGraphCopy() [2/2]

ogdf::ClusterGraphCopy::ClusterGraphCopy ( const ExtendedNestingGraph H,
const ClusterGraph CG 
)

Member Function Documentation

◆ copy()

cluster ogdf::ClusterGraphCopy::copy ( cluster  cOrig) const
inline

Definition at line 269 of file ExtendedNestingGraph.h.

◆ createClusterTree()

void ogdf::ClusterGraphCopy::createClusterTree ( cluster  cOrig)
private

◆ getOriginalClusterGraph()

const ClusterGraph& ogdf::ClusterGraphCopy::getOriginalClusterGraph ( ) const
inline

Definition at line 267 of file ExtendedNestingGraph.h.

◆ init()

void ogdf::ClusterGraphCopy::init ( const ExtendedNestingGraph H,
const ClusterGraph CG 
)

◆ original()

cluster ogdf::ClusterGraphCopy::original ( cluster  cCopy) const
inline

Definition at line 270 of file ExtendedNestingGraph.h.

◆ setParent()

void ogdf::ClusterGraphCopy::setParent ( node  v,
cluster  c 
)

Member Data Documentation

◆ m_copy

ClusterArray<cluster> ogdf::ClusterGraphCopy::m_copy
private

Definition at line 280 of file ExtendedNestingGraph.h.

◆ m_original

ClusterArray<cluster> ogdf::ClusterGraphCopy::m_original
private

Definition at line 281 of file ExtendedNestingGraph.h.

◆ m_pCG

const ClusterGraph* ogdf::ClusterGraphCopy::m_pCG
private

Definition at line 277 of file ExtendedNestingGraph.h.

◆ m_pH

const ExtendedNestingGraph* ogdf::ClusterGraphCopy::m_pH
private

Definition at line 278 of file ExtendedNestingGraph.h.


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