62 setEdgeTypeOf(e, edgeTypeOf(e) | clusterPattern());
65 return (edgeTypeOf(e) & clusterPattern()) == clusterPattern();
68 return *m_pClusterGraph;
80 void insertEdgePathEmbedded(
85 void ModelBoundaries();
94 virtual void expand(
bool lowDegreeExpand =
false)
override;
96 virtual void expandLowDegreeVertices(
OrthoRep &OR);
104 m_edgeClusterID[eNew] = m_edgeClusterID[e];
105 m_nodeClusterID[eNew->
source()] = m_edgeClusterID[e];
118 const auto sourceId = ClusterID(e->
source());
119 const auto targetId = ClusterID(e->
target());
120 cluster targetCluster = clusterOfIndex(targetId);
122 if (sourceId == targetId)
123 return targetCluster;
125 cluster sourceCluster = clusterOfIndex(sourceId);
127 if (sourceCluster == targetCluster->
parent())
128 return sourceCluster;
129 if (targetCluster == sourceCluster->
parent())
130 return targetCluster;
131 if (targetCluster->parent() == sourceCluster->
parent())
132 return sourceCluster->
parent();
142 return m_clusterOfIndex[i];
149 return clusterOfIndex(ClusterID(v));
153 void writeGML(
const char *fileName,
const Layout &drawing);
154 void writeGML(
const char *fileName);
155 void writeGML(std::ostream &os,
const Layout &drawing);
159 void convertClusterGraph(
cluster act,
170 void reinsertEdge(
edge e);
node target() const
Returns the target node of the edge.
EdgeArray< int > m_edgeClusterID
cluster clusterOfIndex(int i)
edgeType clusterPattern()
Declaration and implementation of HashArray class.
Derived class of GraphObserver providing additional functionality to handle clustered graphs...
void setClusterBoundary(edge e)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
cluster clusterOfEdge(edge e)
Returns cluster of edge e.
cluster parent()
Returns the parent of the cluster.
#define OGDF_THROW(CLASS)
Replacement for throw.
Indexed arrays using hashing for element access.
bool isClusterBoundary(edge e)
Orthogonal representation of an embedded graph.
Declaration of a base class for planar representations of graphs and cluster graphs.
Dynamic arrays indexed with adjacency entries.
Singly linked lists (maintaining the length of the list).
int ClusterID(node v) const
const ClusterGraph * m_pClusterGraph
Representation of clustered graphs.
int ClusterID(edge e) const
const ClusterGraph & getClusterGraph() const
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing...
Class for the representation of edges.
adjEntry m_rootAdj
Connects cluster on highest level with non cluster or same level.
Stores additional attributes of a clustered graph (like layout information).
Planarized representations for clustered graphs.
virtual edge split(edge e) override
Splits edge e, updates clustercage lists if necessary and returns new edge.
Class for the representation of nodes.
cluster clusterOfDummy(node v)
virtual edge split(edge e) override
Splits edge e.
Declares ClusterGraphAttributes, an extension of class GraphAttributes, to store clustergraph layout ...
Representation of clusters in a clustered graph.
NodeArray< int > m_nodeClusterID
virtual ~ClusterPlanRep()
HashArray< int, cluster > m_clusterOfIndex
node source() const
Returns the source node of the edge.
Declaration and implementation of ClusterArray class.
The namespace for all OGDF objects.
Combinatorial embeddings of planar graphs with modification functionality.
Class for adjacency list elements.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Planarized representations (of a connected component) of a graph.
Stores a layout of a graph (coordinates of nodes, bend points of edges).