Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanRep.h
Go to the documentation of this file.
1 
34 // PlanRep should not know about generalizations and association,
35 // but we already set types in Attributedgraph, therefore set them
36 // in PlanRep, too
37 
38 #pragma once
39 
40 #include <ogdf/basic/ArrayBuffer.h>
41 #include <ogdf/basic/Graph.h>
43 #include <ogdf/basic/GraphCopy.h>
44 #include <ogdf/basic/SList.h>
45 #include <ogdf/basic/basic.h>
48 
49 #include <iosfwd>
50 
51 namespace ogdf {
52 
53 class CombinatorialEmbedding;
54 class GridLayout;
55 class Layout;
56 class OrthoRep;
57 template<bool>
58 class FaceSet;
59 template<class E>
60 class List;
61 
63 
69 class OGDF_EXPORT PlanRep : public GraphCopy {
70 public:
72  struct Deg1RestoreInfo {
73  Deg1RestoreInfo() : m_eOriginal(nullptr), m_deg1Original(nullptr), m_adjRef(nullptr) { }
74 
75  Deg1RestoreInfo(edge eOrig, node deg1Orig, adjEntry adjRef)
76  : m_eOriginal(eOrig), m_deg1Original(deg1Orig), m_adjRef(adjRef) { }
77 
81  };
82 
85  explicit PlanRep(const Graph& G);
86 
88  explicit PlanRep(const GraphAttributes& AG);
89 
90  virtual ~PlanRep() { }
91 
93 
99 
102  int numberOfCCs() const { return m_ccInfo.numberOfCCs(); }
103 
105  int currentCC() const { return m_currentCC; }
106 
108  const CCsInfo& ccInfo() const { return m_ccInfo; }
109 
111  int numberOfNodesInCC() const { return numberOfNodesInCC(m_currentCC); }
112 
114  int numberOfNodesInCC(int cc) const { return stopNode(cc) - startNode(cc); }
115 
117  node v(int i) const { return m_ccInfo.v(i); }
118 
120  edge e(int i) const { return m_ccInfo.e(i); }
121 
123  int startNode() const { return m_ccInfo.startNode(m_currentCC); }
124 
126  int startNode(int cc) const { return m_ccInfo.startNode(cc); }
127 
129  int stopNode() const { return m_ccInfo.stopNode(m_currentCC); }
130 
132  int stopNode(int cc) const { return m_ccInfo.stopNode(cc); }
133 
135  int startEdge() const { return m_ccInfo.startEdge(m_currentCC); }
136 
138  int stopEdge() const { return m_ccInfo.stopEdge(m_currentCC); }
139 
141 
147  void initCC(int cc);
148 
150 
154 
161  adjEntry expandAdj(node v) const { return m_expandAdj[v]; }
162 
163  adjEntry& expandAdj(node v) { return m_expandAdj[v]; }
164 
166 
169 
175  adjEntry boundaryAdj(node v) const { return m_boundaryAdj[v]; }
176 
181  adjEntry& boundaryAdj(node v) { return m_boundaryAdj[v]; }
182 
183  //edge on the clique boundary, adjSource
184  void setCliqueBoundary(edge e) { setEdgeTypeOf(e, edgeTypeOf(e) | cliquePattern()); }
185 
186  bool isCliqueBoundary(edge e) const {
187  return (edgeTypeOf(e) & cliquePattern()) == cliquePattern();
188  }
189 
191 
194 
200  Graph::NodeType typeOf(node v) const { return m_vType[v]; }
201 
206  Graph::NodeType& typeOf(node v) { return m_vType[v]; }
207 
216  inline bool isVertex(node v) const {
217  return typeOf(v) == Graph::NodeType::vertex || typeOf(v) == Graph::NodeType::associationClass;
218  }
219 
224  nodeType nodeTypeOf(node v) { return m_nodeTypes[v]; }
225 
232  }
233 
238  bool isCrossingType(node v) const {
240  != 0;
241  }
242 
244 
247 
253  EdgeType typeOf(edge e) const { return m_eType[e]; }
254 
259  EdgeType& typeOf(edge e) { return m_eType[e]; }
260 
265  edgeType& oriEdgeTypes(edge e) { return m_oriEdgeTypes[e]; }
266 
271  edgeType edgeTypeOf(edge e) const { return m_edgeTypes[e]; }
272 
277  edgeType& edgeTypes(edge e) { return m_edgeTypes[e]; }
278 
284  void setEdgeTypeOf(edge e, edgeType et) { m_edgeTypes[e] = et; }
285 
294  void setType(edge e, EdgeType et) {
295  m_eType[e] = et;
296  switch (et) {
298  m_edgeTypes[e] = static_cast<edgeType>(UMLEdgeTypeConstants::PrimAssociation);
299  break;
301  m_edgeTypes[e] = static_cast<edgeType>(UMLEdgeTypeConstants::PrimGeneralization);
302  break;
304  m_edgeTypes[e] = static_cast<edgeType>(UMLEdgeTypeConstants::PrimDependency);
305  break;
306  default:
307  break;
308  }
309  }
310 
311  // new edge types
312  // to set or check edge types use the pattern function in the private section
313 
314  // primary level types
315 
317  bool isGeneralization(edge e) const {
318  bool check = (((m_edgeTypes[e] & UMLEdgeTypePatterns::Primary)
321  return check;
322  }
323 
326  setPrimaryType(e, UMLEdgeTypeConstants::PrimGeneralization);
327 
328  //preliminary set old array too
329  m_eType[e] = EdgeType::generalization; //can be removed if edgetypes work properly
330  }
331 
333  bool isDependency(edge e) const {
334  bool check = (((m_edgeTypes[e] & UMLEdgeTypePatterns::Primary)
337  return check;
338  }
339 
341  void setDependency(edge e) {
342  setPrimaryType(e, UMLEdgeTypeConstants::PrimDependency);
343 
344  //preliminary set old array too
345  m_eType[e] = EdgeType::dependency; //can be removed if edgetypes work properly
346  }
347 
350  setPrimaryType(e, UMLEdgeTypeConstants::PrimAssociation);
351 
352  //preliminary set old array too
353  m_eType[e] = EdgeType::association; //can be removed if edgetypes work properly
354  }
355 
356  //second level types
357 
358  //in contrast to setsecondarytype: do not delete old value
359 
361  void setExpansion(edge e) {
362  m_edgeTypes[e] |= expansionPattern();
363 
364  //preliminary set old array too
365  m_expansionEdge[e] = 1; //can be removed if edgetypes work properly
366  }
367 
369  bool isExpansion(edge e) const {
370  return (m_edgeTypes[e] & expansionPattern()) == expansionPattern();
371  }
372 
373  //should add things like cluster and clique boundaries that need rectangle shape
374 
376  bool isBoundary(edge e) const { return isCliqueBoundary(e); }
377 
378  //tertiary types
379 
381  void setAssClass(edge e) { m_edgeTypes[e] |= assClassPattern(); }
382 
384  bool isAssClass(edge e) const {
385  return (m_edgeTypes[e] & assClassPattern()) == assClassPattern();
386  }
387 
388  //fourth level types
389 
391  void setBrother(edge e) { m_edgeTypes[e] |= brotherPattern(); }
392 
394  void setHalfBrother(edge e) { m_edgeTypes[e] |= halfBrotherPattern(); }
395 
397  bool isBrother(edge e) const {
398  return ((m_edgeTypes[e] & UMLEdgeTypePatterns::Fourth & brotherPattern())
401  }
402 
404  bool isHalfBrother(edge e) const {
405  return ((m_edgeTypes[e] & UMLEdgeTypePatterns::Fourth & halfBrotherPattern())
408  }
409 
410  //set generic types
411 
414  m_edgeTypes[e] &= et;
415  return m_edgeTypes[e];
416  }
417 
420  m_edgeTypes[e] |= et;
421  return m_edgeTypes[e];
422  }
423 
426  m_edgeTypes[e] &= 0xfffffff0;
427  m_edgeTypes[e] |= (UMLEdgeTypePatterns::Primary & et);
428  }
429 
432  setPrimaryType(e, static_cast<edgeType>(et));
433  }
434 
437  m_edgeTypes[e] &= 0xffffff0f;
439  }
440 
443  m_edgeTypes[e] &= (UMLEdgeTypePatterns::All & et);
444  return m_edgeTypes[e];
445  }
446 
449  m_edgeTypes[e] |= et;
450  return m_edgeTypes[e];
451  }
452 
454  void setUserType(edge e, edgeType et) {
455  OGDF_ASSERT(et < 147);
456  m_edgeTypes[e] |= (et << UMLEdgeTypeOffsets::User);
457  }
458 
460  bool isUserType(edge e, edgeType et) const {
461  OGDF_ASSERT(et < 147);
462  return (m_edgeTypes[e] & (et << UMLEdgeTypeOffsets::User))
463  == (et << UMLEdgeTypeOffsets::User);
464  }
465 
466  // old edge types
467 
468  //this is pure nonsense, cause we have uml-edgetype and m_etype, and should be able to
469  //use them with different types, but as long as they arent used correctly (switch instead of xor),
470  //use this function to return if e is expansionedge
471  //if it is implemented correctly later, delete the array and return m_etype == Graph::expand
472  //(the whole function then is obsolete, cause you can check it directly, but for convenience...)
473  //should use genexpand, nodeexpand, dissect instead of bool
474 
476  void setExpansionEdge(edge e, int expType) { m_expansionEdge[e] = expType; }
477 
479  bool isExpansionEdge(edge e) const { return m_expansionEdge[e] > 0; }
480 
482  int expansionType(edge e) const { return m_expansionEdge[e]; }
483 
484  //precondition normalized
486  bool isDegreeExpansionEdge(edge e) const {
487 #if 0
488  return (m_eType[e] == Graph::expand);
489 #else
490  return m_expansionEdge[e] == 2;
491 #endif
492  }
493 
495 
500 
502 
504  const NodeArray<double>& widthOrig() const {
505  OGDF_ASSERT(m_pGraphAttributes != nullptr);
506  return m_pGraphAttributes->width();
507  }
508 
510  double widthOrig(node v) const {
511  OGDF_ASSERT(m_pGraphAttributes != nullptr);
512  return m_pGraphAttributes->width(v);
513  }
514 
516  const NodeArray<double>& heightOrig() const {
517  OGDF_ASSERT(m_pGraphAttributes != nullptr);
518  return m_pGraphAttributes->height();
519  }
520 
522  double heightOrig(node v) const {
523  OGDF_ASSERT(m_pGraphAttributes != nullptr);
524  return m_pGraphAttributes->height(v);
525  }
526 
528  EdgeType typeOrig(edge e) const {
529  OGDF_ASSERT(m_pGraphAttributes != nullptr);
530  return m_pGraphAttributes->type(e);
531  }
532 
535  OGDF_ASSERT(m_pGraphAttributes != nullptr);
536  return *m_pGraphAttributes;
537  }
538 
540 
543 
545  // Expands nodes with degree > 4 and merge nodes for generalizations
546  virtual void expand(bool lowDegreeExpand = false);
547 
548  void expandLowDegreeVertices(OrthoRep& OR);
549 
550  void collapseVertices(const OrthoRep& OR, Layout& drawing);
551  void collapseVertices(const OrthoRep& OR, GridLayout& drawing);
552 
553  void removeCrossing(node v); //removes the crossing at node v
554 
555  //model a boundary around a star subgraph centered at center
556  //and keep external face information (outside the clique
557  void insertBoundary(node center, adjEntry& adjExternal);
558 
559 
561 
564 
567  virtual edge split(edge e) override;
568 
569  //returns node which was expanded using v
570  node expandedNode(node v) const { return m_expandedNode[v]; }
571 
572  void setExpandedNode(node v, node w) { m_expandedNode[v] = w; }
573 
575 
578 
585  node newCopy(node vOrig, Graph::NodeType vType);
586 
594  edge newCopy(node v, adjEntry adjAfter, edge eOrig);
595 
604  edge newCopy(node v, adjEntry adjAfter, edge eOrig, CombinatorialEmbedding& E);
605 
606 
608 
611 
614 
619  void insertEdgePath(edge eOrig, const SList<adjEntry>& crossedEdges);
620 
622  void insertEdgePathEmbedded(edge eOrig, CombinatorialEmbedding& E,
623  const SList<adjEntry>& crossedEdges);
624 
626 
630  GraphCopy::removeEdgePathEmbedded(E, eOrig, newFaces);
631  }
632 
634 
648  edge insertCrossing(edge& crossingEdge, edge crossedEdge, bool topDown);
649 
651 
655 
664  void removeDeg1Nodes(ArrayBuffer<Deg1RestoreInfo>& S, const NodeArray<bool>& mark);
665 
671  void restoreDeg1Nodes(ArrayBuffer<Deg1RestoreInfo>& S, List<node>& deg1s);
672 
674  void writeGML(const char* fileName, const OrthoRep& OR, const GridLayout& drawing);
675  void writeGML(std::ostream& os, const OrthoRep& OR, const GridLayout& drawing);
676 
677 protected:
680  //int m_numCC; //!< The number of components in the original graph.
681 
682  //Array<List<node> > m_nodesInCC; //!< The list of original nodes in each component.
683 
685 
686  // object types
687 
688  //set the type of eCopy according to the type of eOrig
689  //should be virtual if PlanRepUML gets its own
690  void setCopyType(edge eCopy, edge eOrig);
691 
692  //helper to cope with the edge types, shifting to the right place
695  }
696 
698  return static_cast<edgeType>(UMLEdgeTypeConstants::PrimAssociation);
699  }
700 
703  }
704 
707  }
708 
711  }
712 
715  }
716 
719  }
720 
722 
724 
727 
728  //clique handling: We save an adjEntry of the first edge of an inserted
729  //boundary around a clique at its center v
731 
732  //zusammenlegbare Typen
733  EdgeArray<int> m_expansionEdge; //1 genmerge, 2 degree (2 highdegree, 3 lowdegree)
735 
736  //m_edgeTypes stores semantic edge type information on several levels:
737  //primary type: generalization, association,...
738  //secondary type: merger,...
739  //tertiary type: vertical in hierarchy, inner, outer, ...
740  //fourth type: neighbour relation (brother, cousin in hierarchy)
741  //user types: user defined for local changes
742  EdgeArray<edgeType> m_edgeTypes; //store all type information
743 
744  //workaround fuer typsuche in insertedgepathembed
745  //speichere kopietyp auf originalen
746  //maybe it's enough to set gen/ass without extra array
748 
749  EdgeArray<edge> m_eAuxCopy; // auxiliary (GraphCopy::initByNodes())
750 };
751 
752 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:53
ogdf::PlanRep::isVertex
bool isVertex(node v) const
Returns true if the node represents a "real" object in the original graph.
Definition: PlanRep.h:216
ogdf::PlanRep::edgeTypeOf
edgeType edgeTypeOf(edge e) const
Returns the new type field of e.
Definition: PlanRep.h:271
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ArrayBuffer.h
Declaration and implementation of ArrayBuffer class.
Graph.h
Includes declaration of graph class.
ogdf::PlanRep::halfBrotherPattern
edgeType halfBrotherPattern() const
Definition: PlanRep.h:713
ogdf::PlanRep::setSecondaryType
void setSecondaryType(edge e, edgeType et)
Sets secondary edge type of edge e to primary edge type in et.
Definition: PlanRep.h:436
ogdf::PlanRep::m_oriEdgeTypes
EdgeArray< edgeType > m_oriEdgeTypes
Definition: PlanRep.h:747
ogdf::Graph::NodeType::vertex
@ vertex
ogdf::PlanRep::assClassPattern
edgeType assClassPattern() const
Definition: PlanRep.h:705
ogdf::Graph::CCsInfo
Info structure for maintaining connected components.
Definition: Graph_d.h:1908
ogdf::PlanRep::isCliqueBoundary
bool isCliqueBoundary(edge e) const
Definition: PlanRep.h:186
ogdf::PlanRep::m_eType
EdgeArray< EdgeType > m_eType
Definition: PlanRep.h:734
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
ogdf::PlanRep::setBrother
void setBrother(edge e)
Classifies edge e as connection between hierarchy neighbours (fourth level type).
Definition: PlanRep.h:391
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:66
ogdf::PlanRep::setExpandedNode
void setExpandedNode(node v, node w)
Definition: PlanRep.h:572
ogdf::UMLEdgeTypeOffsets::Tertiary
@ Tertiary
ogdf::PlanRep::m_boundaryAdj
NodeArray< adjEntry > m_boundaryAdj
Definition: PlanRep.h:730
ogdf::Graph::NodeType::associationClass
@ associationClass
ogdf::UMLEdgeTypeOffsets::Secondary
@ Secondary
ogdf::PlanRep::edgeTypeAND
edgeType edgeTypeAND(edge e, edgeType et)
Sets type of edge e to current type (bitwise) AND et.
Definition: PlanRep.h:413
ogdf::PlanRep::expansionPattern
edgeType expansionPattern() const
Definition: PlanRep.h:701
ogdf::PlanRep::stopNode
int stopNode(int cc) const
Returns the index of (one past) the last node in connected component cc.
Definition: PlanRep.h:132
ogdf::PlanRep::stopEdge
int stopEdge() const
Returns the index of (one past) the last edge in this connected component.
Definition: PlanRep.h:138
ogdf::PlanRep::Deg1RestoreInfo::Deg1RestoreInfo
Deg1RestoreInfo()
Definition: PlanRep.h:73
ogdf::PlanRep::typeOf
EdgeType & typeOf(edge e)
Returns a reference to the type of edge e.
Definition: PlanRep.h:259
ogdf::UMLNodeTypeConstants::TerCrossing
@ TerCrossing
ogdf::PlanRep::~PlanRep
virtual ~PlanRep()
Definition: PlanRep.h:90
ogdf::PlanRep::m_vType
NodeArray< NodeType > m_vType
Simple node types.
Definition: PlanRep.h:721
ogdf::PlanRep::isHalfBrother
bool isHalfBrother(edge e) const
Returns true if edge e is classified as half-brother.
Definition: PlanRep.h:404
ogdf::sync_plan::split
std::pair< node, node > split(Graph &G, sync_plan::PipeBij &bij, const EdgeArray< edge > *new_edges=nullptr, const EdgeArray< bool > *reverse_edges=nullptr, node src=nullptr, node tgt=nullptr)
ogdf::PlanRep::brotherPattern
edgeType brotherPattern() const
Definition: PlanRep.h:709
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::nodeType
long long nodeType
Definition: NodeTypePatterns.h:44
ogdf::PlanRep::widthOrig
double widthOrig(node v) const
Returns the width of original node v.
Definition: PlanRep.h:510
ogdf::edgeType
long long edgeType
Definition: EdgeTypePatterns.h:42
ogdf::PlanRep::expandAdj
adjEntry expandAdj(node v) const
Returns the adjacency entry of a node of an expanded face.
Definition: PlanRep.h:161
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::PlanRep::setType
void setType(edge e, EdgeType et)
Set both type values of e at once.
Definition: PlanRep.h:294
ogdf::PlanRep::Deg1RestoreInfo::Deg1RestoreInfo
Deg1RestoreInfo(edge eOrig, node deg1Orig, adjEntry adjRef)
Definition: PlanRep.h:75
ogdf::PlanRep::isExpansionEdge
bool isExpansionEdge(edge e) const
Returns if e is an expansion edge.
Definition: PlanRep.h:479
ogdf::PlanRep::m_expandAdj
NodeArray< adjEntry > m_expandAdj
Definition: PlanRep.h:726
ogdf::UMLEdgeTypeConstants::AssClass
@ AssClass
ogdf::UMLEdgeTypeConstants::PrimDependency
@ PrimDependency
ogdf::PlanRep::edgeTypePrimaryOR
edgeType edgeTypePrimaryOR(edge e, edgeType et)
Sets primary type of e to bitwise OR of et's primary value and old value.
Definition: PlanRep.h:448
ogdf::PlanRep::ccInfo
const CCsInfo & ccInfo() const
Returns the connected components info structure.
Definition: PlanRep.h:108
ogdf::PlanRep::setPrimaryType
void setPrimaryType(edge e, edgeType et)
Sets primary edge type of edge e to primary edge type in et (deletes old primary value).
Definition: PlanRep.h:425
ogdf::UMLNodeTypeOffsets::Tertiary
@ Tertiary
ogdf::UMLEdgeTypePatterns::Secondary
@ Secondary
ogdf::PlanRep::isExpansion
bool isExpansion(edge e) const
Returns true iff edge e is classified as expansion edge.
Definition: PlanRep.h:369
ogdf::PlanRep::Deg1RestoreInfo::m_adjRef
adjEntry m_adjRef
the reference adjacency entry for restoring the edge
Definition: PlanRep.h:80
ogdf::PlanRep::v
node v(int i) const
Returns node i in the list of all original nodes.
Definition: PlanRep.h:117
ogdf::PlanRep::numberOfNodesInCC
int numberOfNodesInCC(int cc) const
Returns the number of nodes in connected component cc.
Definition: PlanRep.h:114
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::PlanRep::m_pGraphAttributes
const GraphAttributes * m_pGraphAttributes
Pointer to graph attributes of original graph.
Definition: PlanRep.h:684
ogdf::PlanRep::cliquePattern
edgeType cliquePattern() const
Definition: PlanRep.h:717
ogdf::PlanRep::isDegreeExpansionEdge
bool isDegreeExpansionEdge(edge e) const
Returns if e is a degree expansion edge.
Definition: PlanRep.h:486
ogdf::UMLEdgeTypePatterns::Primary
@ Primary
ogdf::UMLEdgeTypeOffsets::Fourth
@ Fourth
ogdf::PlanRep::setAssClass
void setAssClass(edge e)
Classifies edge e as connection at an association class (tertiary type).
Definition: PlanRep.h:381
ogdf::PlanRep::m_edgeTypes
EdgeArray< edgeType > m_edgeTypes
Definition: PlanRep.h:742
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::PlanRep::stopNode
int stopNode() const
Returns the index of (one past) the last node in this connected component.
Definition: PlanRep.h:129
ogdf::PlanRep::setAssociation
void setAssociation(edge e)
Classifies edge e as association (primary type).
Definition: PlanRep.h:349
ogdf::PlanRep::isBrother
bool isBrother(edge e) const
Returns true if edge e is classified as brother.
Definition: PlanRep.h:397
ogdf::Graph::EdgeType::association
@ association
ogdf::OrthoRep
Orthogonal representation of an embedded graph.
Definition: OrthoRep.h:225
SList.h
Declaration of singly linked lists and iterators.
ogdf::PlanRep::numberOfCCs
int numberOfCCs() const
Returns the number of connected components in the original graph.
Definition: PlanRep.h:102
ogdf::PlanRep::m_ccInfo
Graph::CCsInfo m_ccInfo
Definition: PlanRep.h:679
ogdf::PlanRep::startEdge
int startEdge() const
Returns the index of the first edge in this connected component.
Definition: PlanRep.h:135
ogdf::PlanRep::boundaryAdj
adjEntry boundaryAdj(node v) const
Returns the adjacency entry of the first edge of the inserted boundary at a center node (original) of...
Definition: PlanRep.h:175
ogdf::PlanRep::typeOf
Graph::NodeType typeOf(node v) const
Returns the type of node v.
Definition: PlanRep.h:200
ogdf::PlanRep::expandAdj
adjEntry & expandAdj(node v)
Definition: PlanRep.h:163
ogdf::PlanRep::m_currentCC
int m_currentCC
The index of the current component.
Definition: PlanRep.h:678
ogdf::FaceSet< false >
ogdf::PlanRep::typeOf
EdgeType typeOf(edge e) const
Returns the type of edge e.
Definition: PlanRep.h:253
ogdf::Graph::EdgeType::generalization
@ generalization
ogdf::UMLEdgeTypePatterns::Fourth
@ Fourth
ogdf::UMLEdgeTypeConstants::SecClique
@ SecClique
ogdf::PlanRep::setEdgeTypeOf
void setEdgeTypeOf(edge e, edgeType et)
Sets the new type field of edge e to et.
Definition: PlanRep.h:284
ogdf::PlanRep::boundaryAdj
adjEntry & boundaryAdj(node v)
Returns a reference to the adjacency entry of the first edge of the inserted boundary at a center nod...
Definition: PlanRep.h:181
GraphCopy.h
Declaration of graph copy classes.
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::PlanRep::e
edge e(int i) const
Returns edge i in the list of all original edges.
Definition: PlanRep.h:120
ogdf::PlanRep::expandedNode
node expandedNode(node v) const
Definition: PlanRep.h:570
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::PlanRep::removeEdgePathEmbedded
void removeEdgePathEmbedded(CombinatorialEmbedding &E, edge eOrig, FaceSet< false > &newFaces)
Removes the complete edge path for edge eOrig while preserving the embedding.
Definition: PlanRep.h:629
ogdf::PlanRep::isDependency
bool isDependency(edge e) const
Returns true iff edge e is classified as dependency.
Definition: PlanRep.h:333
ogdf::UMLEdgeTypeConstants::HalfBrother
@ HalfBrother
ogdf::GraphCopy::removeEdgePathEmbedded
void removeEdgePathEmbedded(CombinatorialEmbedding &E, edge eOrig, FaceSet< false > &newFaces)
Removes the complete edge path for edge eOrig while preserving the embedding.
ogdf::PlanRep::oriEdgeTypes
edgeType & oriEdgeTypes(edge e)
Returns a reference to the type of original edge e.
Definition: PlanRep.h:265
ogdf::PlanRep::Deg1RestoreInfo::m_eOriginal
edge m_eOriginal
the original edge leading to the deg-1 node
Definition: PlanRep.h:78
ogdf::PlanRep::associationPattern
edgeType associationPattern() const
Definition: PlanRep.h:697
ogdf::UMLEdgeTypeConstants::PrimAssociation
@ PrimAssociation
ogdf::PlanRep::edgeTypeOR
edgeType edgeTypeOR(edge e, edgeType et)
Sets type of edge e to current type (bitwise) OR et.
Definition: PlanRep.h:419
ogdf::UMLEdgeTypeConstants::Brother
@ Brother
ogdf::Graph::NodeType
NodeType
The type of nodes.
Definition: Graph_d.h:912
ogdf::PlanRep::heightOrig
double heightOrig(node v) const
Returns the height of original node v.
Definition: PlanRep.h:522
ogdf::PlanRep::setCrossingType
void setCrossingType(node v)
Classifies node v as a crossing.
Definition: PlanRep.h:230
ogdf::PlanRep::heightOrig
const NodeArray< double > & heightOrig() const
Gives access to the node array of the heights of original nodes.
Definition: PlanRep.h:516
NodeTypePatterns.h
Declaration of node types and patterns for planar representations.
ogdf::PlanRep::isBoundary
bool isBoundary(edge e) const
Returns true iff edge e is a clique boundary.
Definition: PlanRep.h:376
ogdf::PlanRep::nodeTypeOf
nodeType nodeTypeOf(node v)
Returns the extended node type of v.
Definition: PlanRep.h:224
ogdf::PlanRep::setGeneralization
void setGeneralization(edge e)
Classifies edge e as generalization (primary type).
Definition: PlanRep.h:325
ogdf::PlanRep::isCrossingType
bool isCrossingType(node v) const
Returns true iff node v is classified as a crossing.
Definition: PlanRep.h:238
ogdf::PlanRep::edgeTypePrimaryAND
edgeType edgeTypePrimaryAND(edge e, edgeType et)
Sets primary type of e to bitwise AND of et's primary value and old value.
Definition: PlanRep.h:442
ogdf::UMLEdgeTypeConstants
UMLEdgeTypeConstants
Definition: EdgeTypePatterns.h:65
ogdf::PlanRep::numberOfNodesInCC
int numberOfNodesInCC() const
Returns the number of nodes in the current connected component.
Definition: PlanRep.h:111
ogdf::PlanRep::setCliqueBoundary
void setCliqueBoundary(edge e)
Definition: PlanRep.h:184
ogdf::PlanRep::startNode
int startNode(int cc) const
Returns the index of the first node in connected component cc.
Definition: PlanRep.h:126
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::PlanRep::getGraphAttributes
const GraphAttributes & getGraphAttributes() const
Returns the graph attributes of the original graph (the pointer may be 0).
Definition: PlanRep.h:534
ogdf::PlanRep::setPrimaryType
void setPrimaryType(edge e, UMLEdgeTypeConstants et)
Sets primary edge type of edge e to primary edge type in et (deletes old primary value).
Definition: PlanRep.h:431
ogdf::PlanRep::currentCC
int currentCC() const
Returns the index of the current connected component (-1 if not yet initialized).
Definition: PlanRep.h:105
ogdf::CombinatorialEmbedding
Combinatorial embeddings of planar graphs with modification functionality.
Definition: CombinatorialEmbedding.h:406
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::PlanRep::setExpansionEdge
void setExpansionEdge(edge e, int expType)
Sets the expansion edge type of e to expType.
Definition: PlanRep.h:476
ogdf::PlanRep::expansionType
int expansionType(edge e) const
Returns the expansion edge type of e.
Definition: PlanRep.h:482
ogdf::PlanRep::setExpansion
void setExpansion(edge e)
Classifies edge e as expansion edge (secondary type).
Definition: PlanRep.h:361
ogdf::GridLayout
Representation of a graph's grid layout.
Definition: GridLayout.h:47
ogdf::PlanRep::isGeneralization
bool isGeneralization(edge e) const
Returns true iff edge e is classified as generalization.
Definition: PlanRep.h:317
ogdf::PlanRep::edgeTypes
edgeType & edgeTypes(edge e)
Returns a reference to the new type field of e.
Definition: PlanRep.h:277
ogdf::UMLEdgeTypeConstants::SecExpansion
@ SecExpansion
ogdf::PlanRep::setDependency
void setDependency(edge e)
Classifies edge e as dependency (primary type).
Definition: PlanRep.h:341
ogdf::PlanRep::widthOrig
const NodeArray< double > & widthOrig() const
Gives access to the node array of the widths of original nodes.
Definition: PlanRep.h:504
ogdf::PlanRep::Deg1RestoreInfo
Information for restoring degree-1 nodes.
Definition: PlanRep.h:72
ogdf::PlanRep::m_expandedNode
NodeArray< node > m_expandedNode
For all expansion nodes, save expanded node.
Definition: PlanRep.h:725
ogdf::Graph::EdgeType::dependency
@ dependency
ogdf::UMLEdgeTypeConstants::PrimGeneralization
@ PrimGeneralization
ogdf::UMLEdgeTypeOffsets::User
@ User
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::PlanRep::typeOf
Graph::NodeType & typeOf(node v)
Returns a reference to the type of node v.
Definition: PlanRep.h:206
ogdf::PlanRep::setHalfBrother
void setHalfBrother(edge e)
Classifies edge e as connection between ... (fourth level type).
Definition: PlanRep.h:394
ogdf::PlanRep::Deg1RestoreInfo::m_deg1Original
node m_deg1Original
the original deg-1 node
Definition: PlanRep.h:79
ogdf::PlanRep::setUserType
void setUserType(edge e, edgeType et)
Sets user defined type locally.
Definition: PlanRep.h:454
ogdf::PlanRep::typeOrig
EdgeType typeOrig(edge e) const
Returns the type of original edge e.
Definition: PlanRep.h:528
ogdf::PlanRep::isAssClass
bool isAssClass(edge e) const
Returns true iff edge e is classified as connection at an association class.
Definition: PlanRep.h:384
ogdf::UMLEdgeTypePatterns::All
@ All
ogdf::PlanRep::isUserType
bool isUserType(edge e, edgeType et) const
Returns user defined type.
Definition: PlanRep.h:460
EdgeTypePatterns.h
Edge types and patterns for planar representations.
ogdf::PlanRep::startNode
int startNode() const
Returns the index of the first node in this connected component.
Definition: PlanRep.h:123
ogdf::PlanRep::generalizationPattern
edgeType generalizationPattern() const
Definition: PlanRep.h:693
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::PlanRep::m_nodeTypes
NodeArray< nodeType > m_nodeTypes
Node types for extended semantic information.
Definition: PlanRep.h:723
ogdf::PlanRep::m_expansionEdge
EdgeArray< int > m_expansionEdge
Definition: PlanRep.h:733
ogdf::PlanRep::m_eAuxCopy
EdgeArray< edge > m_eAuxCopy
Definition: PlanRep.h:749