Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Simplify.h
Go to the documentation of this file.
1
31#pragma once
32
33#include <ogdf/basic/Graph.h>
34#include <ogdf/basic/List.h>
35#include <ogdf/basic/SList.h>
37
38#include <functional>
39#include <iosfwd>
40
41namespace ogdf {
42class EdgeSet;
43} // namespace ogdf
44
45namespace ogdf::pc_tree {
46class NodePCRotation;
47} // namespace ogdf::pc_tree
48
49namespace ogdf::sync_plan {
50
51class SyncPlanComponents;
52
53namespace internal {
54
58
59 explicit SimplifyMapping(adjEntry u2Adj = nullptr, adjEntry uAdj = nullptr,
60 adjEntry vAdj = nullptr, adjEntry v2Adj = nullptr);
61
62 friend std::ostream& operator<<(std::ostream& os, const SimplifyMapping& mapping);
63};
64
68
69 explicit FrozenSimplifyMapping(int u2Adj = -1, int uAdj = -1, int vAdj = -1, int v2Adj = -1);
70
71 friend std::ostream& operator<<(std::ostream& os, const FrozenSimplifyMapping& mapping);
72};
73
77
78public:
79 UndoSimplify(const List<SimplifyMapping>& in_bij, node u2, node u, node v, node v2 = nullptr);
80
81 void undo(SyncPlan& pq) override;
82
83 std::ostream& print(std::ostream& os) const override;
84};
85
90int findCycles(Graph& G, node u, const std::function<adjEntry(adjEntry)>& mapping,
91 List<List<adjEntry>>& cycles, std::ostream& log);
92
105 List<adjEntry>& dfs_stack);
106
116adjEntry startNodeDFS(Graph& G, adjEntry u_adj, node v, EdgeSet& visited, List<adjEntry>& dfs_stack);
117
124int exhaustiveNodeDFS(Graph& G, adjEntry u_adj, node v, EdgeSet& visited, List<adjEntry>& out);
125
126#ifdef OGDF_DEBUG
127
131bool compareWithExhaustiveNodeDFS(Graph& G, adjEntry u_adj, node v, const EdgeSet& visited,
132 const List<adjEntry>& found);
133
139
144 SyncPlanComponents& components);
145
146#endif
147
148}
149}
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
Declaration of singly linked lists and iterators.
The main code for modelling and solving Synchronized Planarity instances.
Class for adjacency list elements.
Definition Graph_d.h:143
Edge sets.
Definition GraphSets.h:86
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Class for the representation of nodes.
Definition Graph_d.h:241
Singly linked lists (maintaining the length of the list).
Definition SList.h:845
This class represents the embedding tree of a single node in a biconnected component.
The information needed for undoing the changes a specific operation made to the graph while maintaini...
Definition SyncPlan.h:155
(Bi)Connected components information maintained during the SyncPlan algorithm.
A class for modelling and solving Synchronized Planarity instances.
Definition SyncPlan.h:124
void undo(SyncPlan &pq) override
UndoSimplify(const List< SimplifyMapping > &in_bij, node u2, node u, node v, node v2=nullptr)
SList< FrozenSimplifyMapping > bij
Definition Simplify.h:76
std::ostream & print(std::ostream &os) const override
AdjElement * adjEntry
The type of adjacency entries.
Definition Graph_d.h:79
adjEntry continueNodeDFS(Graph &G, adjEntry u_adj, node v, EdgeSet &visited, List< adjEntry > &dfs_stack)
Continue a DFS from the last node of dfs_stack until an unvisited edge incident to v is found.
bool compareWithExhaustiveNodeDFS(Graph &G, adjEntry u_adj, node v, const EdgeSet &visited, const List< adjEntry > &found)
Check that the method exhaustiveNodeDFS would return the same adjEntries as contained in found.
int exhaustiveNodeDFS(Graph &G, adjEntry u_adj, node v, EdgeSet &visited, List< adjEntry > &out)
Use a DFS to find all edges incident to v reachable from u_adj without crossing the node u and add th...
int findCycles(Graph &G, node u, const std::function< adjEntry(adjEntry)> &mapping, List< List< adjEntry > > &cycles, std::ostream &log)
Find all cycles the permutation mapping defines on the order of the adjEntries of u and put all adjEn...
bool validateCollectedAdjs(node v, node u, List< SimplifyMapping > &bij_list, EdgeSet &visited, SyncPlanComponents &components)
Check that /p bij_list contains all adjEntries of v which belong to a parallel bundle leading to u.
adjEntry startNodeDFS(Graph &G, adjEntry u_adj, node v, EdgeSet &visited, List< adjEntry > &dfs_stack)
Use a DFS to find an edge incident to v reachable from u_adj without crossing the node u.
void validatePartnerPCTree(const NodePCRotation *u_pc, const NodePCRotation *v_pc)
For two poles u,v of an (SPQR-Tree) parallel, check that their embedding PCTrees correctly represent ...
The namespace for all OGDF objects.
friend std::ostream & operator<<(std::ostream &os, const FrozenSimplifyMapping &mapping)
FrozenSimplifyMapping(int u2Adj=-1, int uAdj=-1, int vAdj=-1, int v2Adj=-1)
SimplifyMapping(adjEntry u2Adj=nullptr, adjEntry uAdj=nullptr, adjEntry vAdj=nullptr, adjEntry v2Adj=nullptr)
friend std::ostream & operator<<(std::ostream &os, const SimplifyMapping &mapping)