74 GraphAttributes::init(G, initAttr);
75 m_hierarchyParent.init(constGraph(),
nullptr);
76 m_upwardEdge.init(constGraph(),
false);
82 virtual void init(
const Graph& G,
long initAttr)
override {
83 init(
const_cast<Graph&
>(G), initAttr);
121 void computeCliquePosition(
node center,
double rectMin);
122 void computeCliquePosition(
node center,
double rectMin,
const adjEntry &startAdj);
144 return m_replacementEdge[e];
151 Graph& pureGraph()
const {
return *m_pG;}
154 void setAlign(edge e,
bool b) {m_alignEdge[e] = b;}
177 void sortEdgesFromLayout();
185 : m_width(width), m_height(height), m_x(x), m_y(y), m_edge(e), m_node(nullptr) { }
203 m_assClassList.pushBack(ac);
207 node v = m_pG->newNode();
210 m_associationClassModel[ac->
m_edge] = v;
213 if (m_attributes & GraphAttributes::nodeType) {
214 m_vType[v] = Graph::NodeType::associationClass;
225 modelAssociationClass((*it));
231 node dummy = m_pG->split(ac->
m_edge)->source();
236 m_pG->newEdge(ac->
m_node, dummy);
244 undoAssociationClass((*it));
275 m_pG->unsplit(dummy);
297 CliqueInfo(
node v,
int i) : m_target(v), m_edgeIndex(i) {}
Includes declaration of graph class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of singly linked lists and iterators.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Class for adjacency list elements.
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
edge theEdge() const
Returns the edge associated with this adjacency entry.
node theNode() const
Returns the node whose adjacency list contains this element.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Rectangles with real coordinates.
Class for the representation of edges.
Functionality for temporarily hiding edges in constant time.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
Class for the representation of nodes.
int degree() const
Returns the degree of the node (indegree + outdegree).
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
Singly linked lists (maintaining the length of the list).
Encapsulates a pointer to an ogdf::SList element.
bool valid() const
Returns true iff the iterator points to an element.
Modelling of association classes.
AssociationClass(edge e, double width=1.0, double height=1.0, double x=0.0, double y=0.0)
void writeGML(std::ostream &os)
Writes attributed graph in GML format to output stream os.
void undoStars()
Undo clique replacements.
NodeArray< DRect > m_cliqueCircleSize
save the bounding box size of the circular drawing of the clique at center
void writeGML(const char *fileName)
Writes attributed graph in GML format to file fileName.
void setUpwards(adjEntry a, bool b)
Sets status of edges to be specially embedded (if alignment)
EdgeArray< node > m_associationClassModel
modelled classes are stored
SListPure< edge > m_mergeEdges
EdgeArray< AssociationClass * > m_assClass
association class for list
virtual void init(const Graph &G, long initAttr) override
Initializes the graph attributes for graph G.
void modelAssociationClasses()
Inserts representation for association class in underlying graph.
void replaceByStar(List< List< node > > &cliques)
Replaces (dense) subgraphs given in list clique by inserting a center node connected to each node (=>...
virtual ~UMLGraph()
Destructor.
node replaceByStar(List< node > &clique, NodeArray< int > &cliqueNum)
bool isReplacement(edge e)
Returns true if edge was inserted during clique replacement.
NodeArray< DPoint > m_cliqueCirclePos
save the position of the node in the circular drawing of the clique
SListPure< AssociationClass * > m_assClassList
saves all accociation classes
virtual void init(Graph &G, long initAttr)
AdjEntryArray< bool > m_upwardEdge
used to classify edges for embedding with alignment
double getDefaultCliqueCenterSize()
node createAssociationClass(edge e, double width=1.0, double height=1.0)
Adds association class to edge e.
void undoAssociationClasses()
double m_cliqueCenterSize
default size of inserted clique replacement center nodes
void undoAssociationClass(AssociationClass *ac)
Removes the modeling of the association class without removing the information.
void computeCliquePosition(List< node > &adjNodes, node center, double rectMin=-1.0)
Compute positions for the nodes in adjNodes on a circle.
NodeArray< node > m_hierarchyParent
used to derive edge types for alignment in PlanRepUML (same hierarchyparent => edge connects (half)br...
SListPure< node > m_centerNodes
center nodes introduced at clique replacement
node doInsertMergers(node v, SList< edge > &inGens)
Inserts mergers per node with given edges.
bool upwards(adjEntry a) const
const SListPure< AssociationClass * > & assClassList() const
DRect cliqueRect(node v)
Returns the size of a circular drawing for a clique around center v.
void undoStar(node center, bool restoreAllEdges)
Boolean switches restore of all hidden edges in single clique call.
EdgeArray< bool > m_replacementEdge
used to mark clique replacement edges
UMLGraph(Graph &G, long initAttributes=0)
By default, all edges are associations.
node modelAssociationClass(AssociationClass *ac)
DRect circularBound(node center)
void adjustHierarchyParents()
Adjusts the parent field for all nodes after insertion of mergers. If insertion is done per node via ...
const SListPure< node > & centerNodes()
Graph::HiddenEdgeSet * m_hiddenEdges
void insertGenMergers()
Merges generalizations at a common superclass.
void setDefaultCliqueCenterSize(double i)
Default size of inserted clique replacement center nodes.
const AssociationClass * assClass(edge e) const
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_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.