66 Deg1RestoreInfo() : m_eOriginal(nullptr), m_deg1Original(nullptr), m_adjRef(nullptr) { }
68 : m_eOriginal(eOrig), m_deg1Original(deg1Orig), m_adjRef(adjRef) { }
96 return m_ccInfo.numberOfCCs();
112 return stopNode(cc) - startNode(cc);
116 node v(
int i)
const {
return m_ccInfo.v(i); }
119 edge e(
int i)
const {
return m_ccInfo.e(i); }
122 int startNode()
const {
return m_ccInfo.startNode(m_currentCC); }
125 int startNode(
int cc)
const {
return m_ccInfo.startNode(cc); }
128 int stopNode()
const {
return m_ccInfo.stopNode(m_currentCC); }
131 int stopNode(
int cc)
const {
return m_ccInfo.stopNode(cc); }
134 int startEdge()
const {
return m_ccInfo.startEdge(m_currentCC); }
137 int stopEdge()
const {
return m_ccInfo.stopEdge(m_currentCC); }
161 return m_expandAdj[v];
165 return m_expandAdj[v];
179 return m_boundaryAdj[v];
187 return m_boundaryAdj[v];
192 setEdgeTypeOf(e, edgeTypeOf(e) | cliquePattern());
195 return (edgeTypeOf(e) & cliquePattern()) == cliquePattern();
241 return m_nodeTypes[v];
290 return m_oriEdgeTypes[e];
299 return m_edgeTypes[e];
308 return m_edgeTypes[e];
358 m_eType[e] = EdgeType::generalization;
372 m_eType[e] = EdgeType::dependency;
380 m_eType[e] = EdgeType::association;
389 m_edgeTypes[e] |= expansionPattern();
392 m_expansionEdge[e] = 1;
397 return (m_edgeTypes[e] & expansionPattern()) == expansionPattern();
404 return isCliqueBoundary(e); }
411 m_edgeTypes[e] |= assClassPattern();
417 return (m_edgeTypes[e] & assClassPattern()) == assClassPattern();
424 m_edgeTypes[e] |= brotherPattern();
429 m_edgeTypes[e] |= halfBrotherPattern();
452 m_edgeTypes[e] &= 0xfffffff0;
458 setPrimaryType(e, static_cast<edgeType>(et));
463 m_edgeTypes[e] &= 0xffffff0f;
498 m_expansionEdge[e] = expType;
503 return m_expansionEdge[e] > 0;
513 return (m_eType[e] == Graph::expand);
515 return m_expansionEdge[e] == 2;
532 return m_pGraphAttributes->width();
538 return m_pGraphAttributes->width(v);
544 return m_pGraphAttributes->height();
550 return m_pGraphAttributes->height(v);
556 return m_pGraphAttributes->type(e);
562 return *m_pGraphAttributes;
572 virtual void expand(
bool lowDegreeExpand =
false);
574 void expandLowDegreeVertices(
OrthoRep &OR);
579 void removeCrossing(
node v);
583 void insertBoundary(
node center,
adjEntry& adjExternal);
593 virtual edge split(
edge e)
override;
650 void insertEdgePathEmbedded(
726 void setCopyType(
edge eCopy,
edge eOrig);
Representation of a graph's grid layout.
int startNode(int cc) const
Returns the index of the first node in connected component cc.
int currentCC() const
Returns the index of the current connected component (-1 if not yet initialized). ...
edgeType halfBrotherPattern()
double heightOrig(node v) const
Returns the height of original node v.
EdgeType typeOrig(edge e) const
Returns the type of original edge e.
bool isBrother(edge e)
Returns true if edge e is classified as brother.
node v(int i) const
Returns node i in the list of all original nodes.
edgeType generalizationPattern()
const GraphAttributes * m_pGraphAttributes
Pointer to graph attributes of original graph.
adjEntry boundaryAdj(node v) const
Returns the adjacency entry of the first edge of the inserted boundary at a center node (original) of...
EdgeArray< EdgeType > m_eType
void setUserType(edge e, edgeType et)
Sets user defined type locally.
Deg1RestoreInfo(edge eOrig, node deg1Orig, adjEntry adjRef)
edgeType assClassPattern()
Data type for general directed graphs (adjacency list representation).
NodeArray< nodeType > m_nodeTypes
Node types for extended semantic information.
edge e(int i) const
Returns edge i in the list of all original edges.
int numberOfCCs() const
Returns the number of connected components in the original graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
bool isCliqueBoundary(edge e)
void setDependency(edge e)
Classifies edge e as dependency (primary type).
edgeType edgeTypeAND(edge e, edgeType et)
Sets type of edge e to current type (bitwise) AND et.
void setExpansion(edge e)
Classifies edge e as expansion edge (secondary type).
bool isBoundary(edge e)
Returns true iff edge e is a clique boundary.
edgeType edgeTypeOR(edge e, edgeType et)
Sets type of edge e to current type (bitwise) OR et.
edgeType edgeTypeOf(edge e)
Returns the new type field of e.
void setPrimaryType(edge e, UMLEdgeTypeConstants et)
Sets primary edge type of edge e to primary edge type in et (deletes old primary value).
Orthogonal representation of an embedded graph.
void setExpansionEdge(edge e, int expType)
Sets the expansion edge type of e to expType.
edgeType & oriEdgeTypes(edge e)
Returns a reference to the type of original edge e.
Graph::NodeType & typeOf(node v)
Returns a reference to the type of node v.
edgeType edgeTypePrimaryAND(edge e, edgeType et)
Sets primary type of e to bitwise AND of et's primary value and old value.
void setSecondaryType(edge e, edgeType et)
Sets secondary edge type of edge e to primary edge type in et.
int expansionType(edge e) const
Returns the expansion edge type of e.
void setCrossingType(node v)
Classifies node v as a crossing.
adjEntry & boundaryAdj(node v)
Returns a reference to the adjacency entry of the first edge of the inserted boundary at a center nod...
void setGeneralization(edge e)
Classifies edge e as generalization (primary type).
node m_deg1Original
the original deg-1 node
Information for restoring degree-1 nodes.
bool isHalfBrother(edge e)
Returns true if edge e is classified as half-brother.
Graph::NodeType typeOf(node v) const
Returns the type of node v.
void setType(edge e, EdgeType et)
Set both type values of e at once.
Singly linked lists (maintaining the length of the list).
int stopNode() const
Returns the index of (one past) the last node in this connected component.
NodeArray< node > m_expandedNode
For all expansion nodes, save expanded node.
const GraphAttributes & getGraphAttributes() const
Returns the graph attributes of the original graph (the pointer may be 0).
Declaration of node types and patterns for planar representations.
EdgeArray< edgeType > m_oriEdgeTypes
Declaration of class Layout.
bool isExpansionEdge(edge e) const
Returns if e is an expansion edge.
void setCliqueBoundary(edge e)
EdgeArray< edge > m_eAuxCopy
bool isCrossingType(node v)
Returns true iff node v is classified as a crossing.
void removeEdgePathEmbedded(CombinatorialEmbedding &E, edge eOrig, FaceSetPure &newFaces)
Removes the complete edge path for edge eOrig while preserving the embedding.
edge m_eOriginal
the original edge leading to the deg-1 node
adjEntry expandAdj(node v) const
Returns the adjacency entry of a node of an expanded face.
edgeType expansionPattern()
EdgeType typeOf(edge e) const
Returns the type of edge e.
Declaration of class GridLayout.
Stores additional attributes of a graph (like layout information).
void setAssociation(edge e)
Classifies edge e as association (primary type).
edgeType edgeTypePrimaryOR(edge e, edgeType et)
Sets primary type of e to bitwise OR of et's primary value and old value.
Doubly linked lists (maintaining the length of the list).
bool isUserType(edge e, edgeType et)
Returns user defined type.
Declaration of graph copy classes.
void setEdgeTypeOf(edge e, edgeType et)
Sets the new type field of edge e to et.
bool isDegreeExpansionEdge(edge e) const
Returns if e is a degree expansion edge.
Class for the representation of edges.
Copies of graphs supporting edge splitting.
edgeType & edgeTypes(edge e)
Returns a reference to the new type field of e.
EdgeArray< edgeType > m_edgeTypes
bool isGeneralization(edge e)
Returns true iff edge e is classified as generalization.
Class for the representation of nodes.
void setAssClass(edge e)
Classifies edge e as connection at an association class (tertiary type).
node expandedNode(node v) const
Edge types and patterns for planar representations.
void setPrimaryType(edge e, edgeType et)
Sets primary edge type of edge e to primary edge type in et (deletes old primary value).
Info structure for maintaining connected components.
NodeArray< adjEntry > m_boundaryAdj
double widthOrig(node v) const
Returns the width of original node v.
int numberOfNodesInCC() const
Returns the number of nodes in the current connected component.
nodeType nodeTypeOf(node v)
Returns the extended node type of v.
edgeType brotherPattern()
bool isVertex(node v)
Returns true if the node represents a "real" object in the original graph.
NodeArray< adjEntry > m_expandAdj
int stopEdge() const
Returns the index of (one past) the last edge in this connected component.
bool isExpansion(edge e)
Returns true iff edge e is classified as expansion edge.
const NodeArray< double > & widthOrig() const
Gives access to the node array of the widths of original nodes.
void setBrother(edge e)
Classifies edge e as connection between hierarchy neighbours (fourth level type). ...
int startNode() const
Returns the index of the first node in this connected component.
EdgeType & typeOf(edge e)
Returns a reference to the type of edge e.
The namespace for all OGDF objects.
edgeType associationPattern()
NodeType
The type of nodes.
int numberOfNodesInCC(int cc) const
Returns the number of nodes in connected component cc.
bool isAssClass(edge e)
Returns true iff edge e is classified as connection at an association class.
EdgeArray< int > m_expansionEdge
const NodeArray< double > & heightOrig() const
Gives access to the node array of the heights of original nodes.
void removeEdgePathEmbedded(CombinatorialEmbedding &E, edge eOrig, FaceSetPure &newFaces)
Removes the complete edge path for edge eOrig while preserving the embedding.
Combinatorial embeddings of planar graphs with modification functionality.
int stopNode(int cc) const
Returns the index of (one past) the last node in connected component cc.
bool isDependency(edge e)
Returns true iff edge e is classified as dependency.
void setExpandedNode(node v, node w)
NodeArray< NodeType > m_vType
Simple node types.
Class for adjacency list elements.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
const CCsInfo & ccInfo() const
Returns the connected components info structure.
adjEntry & expandAdj(node v)
int m_currentCC
The index of the current component.
adjEntry m_adjRef
the reference adjacency entry for restoring the edge
The parameterized class Stack<E> implements list-based stacks.
Declaration and implementation of list-based stacks (StackPure<E> and Stack<E>).
int startEdge() const
Returns the index of the first edge in this connected component.
void setHalfBrother(edge e)
Classifies edge e as connection between ... (fourth level type).
Planarized representations (of a connected component) of a graph.
Stores a layout of a graph (coordinates of nodes, bend points of edges).