67 m_hierarchyParent.init(constGraph(),
nullptr);
68 m_upwardEdge.init(constGraph(),
false);
113 void computeCliquePosition(
node center,
double rectMin);
136 return m_replacementEdge[e];
169 void sortEdgesFromLayout();
177 : m_width(width), m_height(height), m_x(x), m_y(y), m_edge(e), m_node(
nullptr) { }
195 m_assClassList.pushBack(
ac);
199 node v = m_pG->newNode();
200 m_height[v] =
ac->m_height;
201 m_width[v] =
ac->m_width;
202 m_associationClassModel[
ac->m_edge] = v;
205 if (m_attributes & GraphAttributes::nodeType) {
206 m_vType[v] = Graph::NodeType::associationClass;
217 modelAssociationClass((*it));
223 node dummy = m_pG->split(
ac->m_edge)->source();
228 m_pG->newEdge(
ac->m_node, dummy);
236 undoAssociationClass((*it));
243 node v = m_associationClassModel[
ac->m_edge];
267 m_pG->unsplit(dummy);
Declaration and implementation of AdjEntryArray class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of singly linked lists and iterators.
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.
Dynamic arrays indexed with adjacency entries.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Rectangles with real coordinates.
Dynamic arrays indexed with edges.
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).
Dynamic arrays indexed with nodes.
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
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.