39 namespace cluster_planarity {
100 node u = e->source();
101 node v = e->target();
111 if (uAncestor == vAncestor)
113 m_repEdge[e] = RepGraph[uAncestor]->newEdge(
124 m_repEdge[e] = RepGraph[uAncestor]->newEdge(
129 m_repEdge[e] = RepGraph[vAncestor]->newEdge(
137 v1 = ( (uAncestor ==
nullptr) ?
m_vRepNode[u] :
139 v2 = ( (vAncestor ==
nullptr) ?
m_vRepNode[v] :
141 m_repEdge[e] = RepGraph[allocCluster]->newEdge(v1, v2);
154 RepGraph[c] =
new Graph;
void constructRepresentationGraphNodes(const ClusterGraph &CG, Graph &g, cluster c)
constructs for every cluster a graph representing its main structure (children & their connections) o...
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.
void computeRepresentationGraphs(const ClusterGraph &CG, ClusterArray< Graph *> &RepGraph)
Computes representation graphs used for spanning tree computation.
void initialize(const ClusterGraph &CG)
Initializes some internally used members on CG.
Derived class of GraphObserver providing additional functionality to handle clustered graphs...
ListConstIterator< node > nBegin() const
Returns the first element in list of child nodes.
Data type for general directed graphs (adjacency list representation).
EdgeArray< cluster > m_allocCluster
store the allocation cluster to avoid multiple computation
Constructs a c-planar subclustered spanning tree of the input by setting edgearray values...
ClusterArray< node > m_cRepNode
store the representation nodes for nodes and clusters
void dfsBuildOriginalST(node v, ClusterArray< EdgeArray< bool > > &treeEdges, EdgeArray< bool > &inST, NodeArray< bool > &visited)
builds spanning tree on original graph out of repgraphs STs
cluster rootCluster() const
Returns the root cluster.
Representation of clustered graphs.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
NodeArray< node > m_vRepNode
Declaration and implementation of EdgeArray class.
Class for the representation of edges.
Dynamic arrays indexed with clusters.
Class for the representation of nodes.
Encapsulates a pointer to a list element.
void dfsBuildSpanningTree(node v, EdgeArray< bool > &treeEdges, NodeArray< bool > &visited)
const Graph & constGraph() const
Returns a reference to the underlying graph.
ListConstIterator< ClusterElement * > cBegin() const
Returns the first element in the list of child clusters.
Representation of clusters in a clustered graph.
void constructRepresentationGraphEdges(const ClusterGraph &CG, ClusterArray< Graph *> &RepGraph)
insert rep edges for all edges in clustergraph
internal::GraphObjectContainer< ClusterElement > clusters
The container containing all cluster objects.
EdgeArray< edge > m_repEdge
store the representation edge
Declaration and implementation of ClusterArray class.
The namespace for all OGDF objects.
node newNode()
Creates a new node and returns it.
void deleteRepresentationGraphs(const ClusterGraph &CG, ClusterArray< Graph *> &RepGraph)
bool valid() const
Returns true iff the iterator points to an element.
virtual void call(const ClusterGraph &CG, EdgeArray< bool > &inST)
sets values in inST according to membership in c-planar STGraph
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.