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>
39 
40 #include <vector>
41 
42 namespace ogdf::pc_tree {
43 class PCNode;
44 } // namespace ogdf::pc_tree
45 
46 namespace ogdf {
47 class Logger;
48 template<class E>
49 class List;
50 } // namespace ogdf
51 
52 namespace ogdf::sync_plan {
53 
54 namespace spqr_utils {
55 inline bool isSNode(const Graph& skel) {
56  return skel.numberOfNodes() > 2 && skel.numberOfNodes() == skel.numberOfEdges();
57 }
58 
59 inline bool isPNode(const Graph& skel) { return skel.numberOfNodes() == 2; }
60 
61 inline bool isRNode(const Graph& skel) { return !isSNode(skel) && !isPNode(skel); }
62 
63 inline adjEntry getAdjInSkel(const OverlappingGraphCopy* skel, adjEntry GC_adj) {
64  return skel->copy(GC_adj->theEdge())->getAdj(skel->copy(GC_adj->theNode()));
65 }
66 
67 inline adjEntry getAdjInOrig(const OverlappingGraphCopy* skel, adjEntry skel_adj) {
68  return skel->original(skel_adj->theEdge())->getAdj(skel->original(skel_adj->theNode()));
69 }
70 }
71 
75  static Logger log;
81  std::vector<OverlappingGraphCopy*> skel_array;
82  bool planar = true;
83 
85 
87 
88  SimpleSPQRTree(OverlappingGraphCopies& OGC_base) : GC(OGC_base), GC_skels(GC) {};
89 
91  for (auto ptr : skel_array) {
92  if (!ptr) {
93  continue;
94  }
95  ptr->breakLinkForMasterDeconstruction();
96  delete ptr;
97  }
98  }
99 
100  void init();
101 
102  OverlappingGraphCopy* getNonSSkel(node GC_n) const;
103 
104  OverlappingGraphCopy* getTwinSkel(OverlappingGraphCopy* skel, edge skel_e) const;
105 
106  OverlappingGraphCopy* getTwinSkel_GC(OverlappingGraphCopy* skel, edge GC_e) const;
107 };
108 
112 
114  pc_tree::PCNode* parent = nullptr);
115 
117  List<edge>& out);
118 
119 public:
121 
123 
125 
126  void mapPartnerEdges();
127 };
128 
129 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
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:110
ogdf::sync_plan::spqr_utils::getAdjInSkel
adjEntry getAdjInSkel(const OverlappingGraphCopy *skel, adjEntry GC_adj)
Definition: NodeTricRotation.h:63
ogdf::AdjElement::theNode
node theNode() const
Returns the node whose adjacency list contains this element.
Definition: Graph_d.h:159
ogdf::sync_plan::spqr_utils::isRNode
bool isRNode(const Graph &skel)
Definition: NodeTricRotation.h:61
ogdf::pc_tree
Definition: NodePCRotation.h:37
ogdf::sync_plan::SimpleSPQRTree::log
static Logger log
Definition: NodeTricRotation.h:75
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:67
ogdf::pc_tree::NodePCRotation
This class represents the embedding tree of a single node in a biconnected component.
Definition: NodePCRotation.h:44
ogdf::sync_plan::SimpleSPQRTree::twins
EdgeArray< OverlappingGraphCopy * > twins
Definition: NodeTricRotation.h:80
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:73
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:111
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::sync_plan::SimpleSPQRTree::GC_skels
OverlappingGraphCopies GC_skels
Definition: NodeTricRotation.h:77
ogdf::sync_plan::spqr_utils::isSNode
bool isSNode(const Graph &skel)
Definition: NodeTricRotation.h:55
ogdf::sync_plan::NodeSSPQRRotation::NodeSSPQRRotation
NodeSSPQRRotation(const NodeSSPQRRotation &copy)=delete
ogdf::sync_plan::spqr_utils::isPNode
bool isPNode(const Graph &skel)
Definition: NodeTricRotation.h:59
ogdf::AdjElement::theEdge
edge theEdge() const
Returns the edge associated with this adjacency entry.
Definition: Graph_d.h:153
ogdf::Graph::numberOfEdges
int numberOfEdges() const
Returns the number of edges in the graph.
Definition: Graph_d.h:977
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:974
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:862
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:58
ogdf::graphics::init
void init()
Definition: graphics.h:446
ogdf::OverlappingGraphCopy::copy
node copy(node v) const
Returns the node in the graph copy corresponding to v.
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:78
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:76
ogdf::sync_plan::SimpleSPQRTree::skel_array
std::vector< OverlappingGraphCopy * > skel_array
Definition: NodeTricRotation.h:81
DisjointSets.h
Implementation of disjoint sets data structures (union-find functionality).
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
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:100
ogdf::sync_plan::SimpleSPQRTree::skels
EdgeArray< OverlappingGraphCopy * > skels
Definition: NodeTricRotation.h:79
ogdf::Triconnectivity::CompStruct
representation of a component
Definition: Triconnectivity.h:87
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::sync_plan::SimpleSPQRTree::~SimpleSPQRTree
~SimpleSPQRTree()
Definition: NodeTricRotation.h:90