58 return isClusterPlanarDestructive(CGcopy, Gcopy);
76 if (!clusterPlanarEmbedClusterPlanarGraph(CGcopy, Gcopy)) {
81 copyBackEmbedding(CG, G, CGcopy, Gcopy, copyC, copyN, copyE, origE);
96 throw std::runtime_error(
97 "Embedding is (currently) not implemented by this ClusterPlanarityModule!");
107 c->adjEntries.clear();
108 for (
adjEntry adj : copyC[c]->adjEntries) {
109 c->adjEntries.pushBack(origE.mapEndpoint(adj));
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Includes declaration of graph class.
Declaration of graph copy classes.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Declares base class for all module types.
void invertRegisteredArray(const RA1 &from, RA2 &to)
Copy data from a ABCArray<XYZ> to an XYZArray<ABC>
Basic declarations, included by all source files.
Class for adjacency list elements.
RegisteredArray for labeling the clusters of a ClusterGraph.
Representation of clusters in a clustered graph.
Representation of clustered graphs.
bool adjAvailable() const
Gets the availability status of the adjacency entries.
const Graph & constGraph() const
Returns a reference to the underlying graph.
internal::GraphObjectContainer< ClusterElement > clusters
The container containing all cluster objects.
virtual bool clusterPlanarEmbedClusterPlanarGraph(ClusterGraph &CG, Graph &G)
Constructs a cluster-planar embedding of CG. CG has to be cluster-planar!
virtual bool isClusterPlanar(const ClusterGraph &CG)
Returns true, if CG is cluster-planar, false otherwise.
virtual ~ClusterPlanarityModule()=default
virtual bool clusterPlanarEmbed(ClusterGraph &CG, Graph &G)
Returns true, if CG is cluster-planar, false otherwise. If true, CG contains a cluster-planar embeddi...
ClusterPlanarityModule()=default
virtual bool isClusterPlanarDestructive(ClusterGraph &CG, Graph &G)=0
Returns true, if CG is cluster-planar, false otherwise. In it is non-cluster-planar,...
virtual void copyBackEmbedding(ClusterGraph &CG, Graph &G, const ClusterGraph &CGcopy, const Graph &Gcopy, const ClusterArray< cluster > ©C, const NodeArray< node > ©N, const EdgeArray< edge > ©E, const EdgeArray< edge > &origE) const
Data type for general directed graphs (adjacency list representation).
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.
void copyEmbedding(const Graph &from, Graph &to, std::function< adjEntry(adjEntry)> adjMapFromTo)