Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

NodeTricRotation.h
Go to the documentation of this file.
1 
31 #pragma once
32 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/SList.h>
36 #include <ogdf/basic/basic.h>
40 
41 #include <vector>
42 
43 namespace ogdf::pc_tree {
44 class PCNode;
45 } // namespace ogdf::pc_tree
46 
47 namespace ogdf {
48 class Logger;
49 template<class E>
50 class List;
51 } // namespace ogdf
52 
53 namespace ogdf::sync_plan {
54 
55 namespace spqr_utils {
56 inline bool isSNode(const Graph& skel) {
57  return skel.numberOfNodes() > 2 && skel.numberOfNodes() == skel.numberOfEdges();
58 }
59 
60 inline bool isPNode(const Graph& skel) { return skel.numberOfNodes() == 2; }
61 
62 inline bool isRNode(const Graph& skel) { return !isSNode(skel) && !isPNode(skel); }
63 
64 inline adjEntry getAdjInSkel(const OverlappingGraphCopy* skel, adjEntry GC_adj) {
65  return skel->copy(GC_adj->theEdge())->getAdj(skel->copy(GC_adj->theNode()));
66 }
67 
68 inline adjEntry getAdjInOrig(const OverlappingGraphCopy* skel, adjEntry skel_adj) {
69  return skel->original(skel_adj->theEdge())->getAdj(skel->original(skel_adj->theNode()));
70 }
71 }
72 
76  static Logger log;
82  std::vector<OverlappingGraphCopy*> skel_array;
83  bool planar = true;
84 
86 
88 
89  SimpleSPQRTree(OverlappingGraphCopies& OGC_base) : GC(OGC_base), GC_skels(GC) {};
90 
92  for (auto ptr : skel_array) {
93  if (!ptr) {
94  continue;
95  }
96  ptr->breakLinkForMasterDeconstruction();
97  delete ptr;
98  }
99  }
100 
101  void init();
102 
103  OverlappingGraphCopy* getNonSSkel(node GC_n) const;
104 
105  OverlappingGraphCopy* getTwinSkel(OverlappingGraphCopy* skel, edge skel_e) const;
106 
107  OverlappingGraphCopy* getTwinSkel_GC(OverlappingGraphCopy* skel, edge GC_e) const;
108 };
109 
113 
115  pc_tree::PCNode* parent = nullptr);
116 
118  List<edge>& out);
119 
120 public:
122 
124 
126 
127  void mapPartnerEdges();
128 };
129 
130 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::OverlappingGraphCopies
The manager class for multiple OverlappingGraphCopy instances of the same graph.
Definition: OverlappingGraphCopies.h:204
ogdf::sync_plan
Definition: clustering.h:44
ogdf::sync_plan::NodeSSPQRRotation
Derive embedding trees from Triconnectivity information.
Definition: NodeTricRotation.h:111
ogdf::sync_plan::spqr_utils::getAdjInSkel
adjEntry getAdjInSkel(const OverlappingGraphCopy *skel, adjEntry GC_adj)
Definition: NodeTricRotation.h:64
ogdf::AdjElement::theNode
node theNode() const
Returns the node whose adjacency list contains this element.
Definition: Graph_d.h:166
ogdf::sync_plan::spqr_utils::isRNode
bool isRNode(const Graph &skel)
Definition: NodeTricRotation.h:62
ogdf::pc_tree
Definition: NodePCRotation.h:47
ogdf::sync_plan::SimpleSPQRTree::log
static Logger log
Definition: NodeTricRotation.h:76
ogdf::sync_plan::NodeSSPQRRotation::getIncidentRealEdgesInSubtree
void getIncidentRealEdgesInSubtree(adjEntry skel_adj, OverlappingGraphCopy &skel, List< edge > &out)
ogdf::sync_plan::spqr_utils::getAdjInOrig
adjEntry getAdjInOrig(const OverlappingGraphCopy *skel, adjEntry skel_adj)
Definition: NodeTricRotation.h:68
ogdf::pc_tree::NodePCRotation
This class represents the embedding tree of a single node in a biconnected component.
Definition: NodePCRotation.h:54
ogdf::sync_plan::SimpleSPQRTree::twins
EdgeArray< OverlappingGraphCopy * > twins
Definition: NodeTricRotation.h:81
ogdf::sync_plan::NodeSSPQRRotation::mapPartnerEdges
void mapPartnerEdges()
OGDF_NO_MOVE
#define OGDF_NO_MOVE(cls)
Explicitly disables (deletes) move construction and assignment for class cls.
Definition: copy_move.h:42
ogdf::sync_plan::SimpleSPQRTree
Wrapper class around Triconnectivity information.
Definition: NodeTricRotation.h:74
ogdf::OverlappingGraphCopy
Version of GraphCopySimple that may efficiently share some overlap with other instances of the same o...
Definition: OverlappingGraphCopies.h:44
ogdf::sync_plan::NodeSSPQRRotation::spqr
const SimpleSPQRTree & spqr
Definition: NodeTricRotation.h:112
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::sync_plan::SimpleSPQRTree::GC_skels
OverlappingGraphCopies GC_skels
Definition: NodeTricRotation.h:78
ogdf::sync_plan::spqr_utils::isSNode
bool isSNode(const Graph &skel)
Definition: NodeTricRotation.h:56
ogdf::sync_plan::NodeSSPQRRotation::NodeSSPQRRotation
NodeSSPQRRotation(const NodeSSPQRRotation &copy)=delete
ogdf::sync_plan::spqr_utils::isPNode
bool isPNode(const Graph &skel)
Definition: NodeTricRotation.h:60
ogdf::AdjElement::theEdge
edge theEdge() const
Returns the edge associated with this adjacency entry.
Definition: Graph_d.h:160
ogdf::Graph::numberOfEdges
int numberOfEdges() const
Returns the number of edges in the graph.
Definition: Graph_d.h:985
OverlappingGraphCopies.h
Multiple GraphCopies that contain different, overlapping parts of the same original graph....
ogdf::OverlappingGraphCopy::original
const Graph & original() const
Returns a reference to the original graph.
ogdf::Graph::numberOfNodes
int numberOfNodes() const
Returns the number of nodes in the graph.
Definition: Graph_d.h:982
SList.h
Declaration of singly linked lists and iterators.
OGDF_NO_COPY
#define OGDF_NO_COPY(cls)
Explicitly disables (deletes) copy construction and assignment for class cls.
Definition: copy_move.h:37
ogdf::List< edge >
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
NodePCRotation.h
An embedding tree representing, for a single node, all orders of incident edges in all planar embeddi...
ogdf::pc_tree::PCNode
A node in a PC-tree that is either a P-node, C-node or leaf.
Definition: PCNode.h:62
ogdf::graphics::init
void init()
Definition: graphics.h:450
ogdf::OverlappingGraphCopy::copy
node copy(node v) const
Returns the node in the graph copy corresponding to v.
basic.h
Basic declarations, included by all source files.
ogdf::sync_plan::NodeSSPQRRotation::process
pc_tree::PCNode * process(adjEntry skel_adj, OverlappingGraphCopy &skel, pc_tree::PCNode *parent=nullptr)
ogdf::sync_plan::SimpleSPQRTree::par_replacement
EdgeArray< SList< edge > > par_replacement
Definition: NodeTricRotation.h:79
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::sync_plan::SimpleSPQRTree::GC
OverlappingGraphCopy GC
Definition: NodeTricRotation.h:77
ogdf::sync_plan::SimpleSPQRTree::skel_array
std::vector< OverlappingGraphCopy * > skel_array
Definition: NodeTricRotation.h:82
DisjointSets.h
Implementation of disjoint sets data structures (union-find functionality).
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
Triconnectivity.h
Declares class Triconnectivity which realizes the Hopcroft/Tarjan algorithm for finding the triconnec...
ogdf::Logger
Centralized global and local logging facility working on streams like std::cout.
Definition: Logger.h:102
ogdf::sync_plan::SimpleSPQRTree::skels
EdgeArray< OverlappingGraphCopy * > skels
Definition: NodeTricRotation.h:80
ogdf::Triconnectivity::CompStruct
representation of a component
Definition: Triconnectivity.h:89
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::sync_plan::SimpleSPQRTree::~SimpleSPQRTree
~SimpleSPQRTree()
Definition: NodeTricRotation.h:91