39 namespace cluster_planarity {
84 for (
auto u : c->
nodes) {
109 if (uAncestor == vAncestor)
111 m_repEdge[e] = RepGraph[uAncestor]->newEdge(
120 m_repEdge[e] = RepGraph[uAncestor]->newEdge(
123 m_repEdge[e] = RepGraph[vAncestor]->newEdge(
129 v1 = ( (uAncestor ==
nullptr) ?
m_vRepNode[u] :
131 v2 = ( (vAncestor ==
nullptr) ?
m_vRepNode[v] :
133 m_repEdge[e] = RepGraph[allocCluster]->newEdge(v1, v2);
144 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...
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
ListContainer< cluster, ClusterElement > children
The container containing the child clusters (children in the cluster tree) of this cluster...
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.
Representation of clusters in a clustered graph.
void constructRepresentationGraphEdges(const ClusterGraph &CG, ClusterArray< Graph *> &RepGraph)
insert rep edges for all edges in clustergraph
ListContainer< node, ClusterElement > nodes
The container containing the nodes lying (directly) in this cluster.
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)
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.