47class ClusterGraphAttributes;
48class CombinatorialEmbedding;
68 return (edgeTypeOf(e) & clusterPattern()) == clusterPattern();
93 virtual void expand(
bool lowDegreeExpand =
false)
override;
99 edge eNew = PlanRep::split(e);
102 m_edgeClusterID[eNew] = m_edgeClusterID[e];
103 m_nodeClusterID[eNew->
source()] = m_edgeClusterID[e];
115 const auto sourceId = ClusterID(e->
source());
116 const auto targetId = ClusterID(e->
target());
117 cluster targetCluster = clusterOfIndex(targetId);
119 if (sourceId == targetId) {
120 return targetCluster;
123 cluster sourceCluster = clusterOfIndex(sourceId);
125 if (sourceCluster == targetCluster->
parent()) {
126 return sourceCluster;
128 if (targetCluster == sourceCluster->
parent()) {
129 return targetCluster;
131 if (targetCluster->
parent() == sourceCluster->
parent()) {
132 return sourceCluster->
parent();
145 return m_clusterOfIndex[i];
151 return clusterOfIndex(ClusterID(v));
175 return UMLEdgeTypeConstants::SecCluster << UMLEdgeTypeOffsets::Secondary;
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Edge types and patterns for planar representations.
Includes declaration of graph class.
Declaration and implementation of HashArray class.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of singly linked lists and iterators.
Basic declarations, included by all source files.
Class for adjacency list elements.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Representation of clusters in a clustered graph.
cluster parent()
Returns the parent of the cluster.
Stores additional attributes of a clustered graph (like layout information).
Representation of clustered graphs.
Planarized representations for clustered graphs.
EdgeArray< int > m_edgeClusterID
virtual ~ClusterPlanRep()
bool isClusterBoundary(edge e)
void writeGML(std::ostream &os, const Layout &drawing)
cluster clusterOfDummy(node v)
int ClusterID(node v) const
void insertEdgePathEmbedded(edge eOrig, CombinatorialEmbedding &E, const SList< adjEntry > &crossedEdges)
re-inserts edge eOrig by "crossing" the edges in crossedEdges; splits each edge in crossedEdges Preco...
void writeGML(const char *fileName, const Layout &drawing)
virtual void expand(bool lowDegreeExpand=false) override
Expands nodes with degree > 4 and merge nodes for generalizations.
HashArray< int, cluster > m_clusterOfIndex
edgeType clusterPattern()
NodeArray< int > m_nodeClusterID
virtual void expandLowDegreeVertices(OrthoRep &OR)
cluster clusterOfIndex(int i)
void writeGML(const char *fileName)
void convertClusterGraph(cluster act, AdjEntryArray< edge > ¤tEdge, AdjEntryArray< int > &outEdge)
Insert boundaries for all given clusters.
void setClusterBoundary(edge e)
ClusterPlanRep(const ClusterGraphAttributes &acGraph, const ClusterGraph &clusterGraph)
cluster clusterOfEdge(edge e)
Returns cluster of edge e.
const ClusterGraph & getClusterGraph() const
void reinsertEdge(edge e)
Reinserts edges to planarize the graph after convertClusterGraph.
adjEntry m_rootAdj
Connects cluster on highest level with non cluster or same level.
const ClusterGraph * m_pClusterGraph
void insertBoundary(cluster C, AdjEntryArray< edge > ¤tEdge, AdjEntryArray< int > &outEdge, bool clusterIsLeaf)
Insert edges to represent the cluster boundary.
int ClusterID(edge e) const
virtual edge split(edge e) override
Splits edge e, updates clustercage lists if necessary and returns new edge.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
node target() const
Returns the target node of the edge.
node source() const
Returns the source node of the edge.
Indexed arrays using hashing for element access.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Class for the representation of nodes.
Orthogonal representation of an embedded graph.
Planarized representations (of a connected component) of a graph.
Singly linked lists (maintaining the length of the list).
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),...
Definition of exception classes.
#define OGDF_THROW(CLASS)
Replacement for throw.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.