Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CPlanarEdgeInserter.h
Go to the documentation of this file.
1 
37 #pragma once
38 
40 #include <ogdf/basic/Graph.h>
41 #include <ogdf/basic/SList.h>
42 #include <ogdf/basic/basic.h>
44 
45 #include <iosfwd>
46 
47 namespace ogdf {
48 class ClusterPlanRep;
49 class Layout;
50 template<class E>
51 class List;
52 
54 
59  enum class PostProcessType { None, RemoveReinsert };
60 
61 public:
63 
64  virtual ~CPlanarEdgeInserter() { }
65 
66  void call(ClusterPlanRep& CPR, CombinatorialEmbedding& E, const Graph& G,
67  const List<edge>& origEdges);
68 
69  void setPostProcessing(PostProcessType p) { m_ppType = p; }
70 
71  PostProcessType getPostProcessing() { return m_ppType; }
72 
73 protected:
74  void constructDualGraph(ClusterPlanRep& CPR, CombinatorialEmbedding& E,
75  EdgeArray<edge>& arcRightToLeft, EdgeArray<edge>& arcLeftToRight,
76  FaceArray<node>& nodeOfFace,
77  //NodeArray<face>& faceOfNode,
78  EdgeArray<edge>& arcTwin);
79 
80  void findShortestPath(const CombinatorialEmbedding& E,
81  node s, //edge startpoint
82  node t, //edge endpoint
83  node sDummy, //representing s in network
84  node tDummy, //representing t in network
85  SList<adjEntry>& crossed, FaceArray<node>& nodeOfFace);
86 
87  void insertEdge(ClusterPlanRep& CPR, CombinatorialEmbedding& E, edge insertMe,
88  FaceArray<node>& nodeOfFace, EdgeArray<edge>& arcRightToLeft,
89  EdgeArray<edge>& arcLeftToRight, EdgeArray<edge>& arcTwin,
90  NodeArray<cluster>& clusterOfFaceNode, const SList<adjEntry>& crossed);
91 
92  void setArcStatus(edge eArc, node oSrc, node oTgt, const ClusterGraph& CG,
93  NodeArray<cluster>& clusterOfFaceNode, EdgeArray<edge>& arcTwin);
94 
96  void postProcess();
97 
98 private:
99  const Graph* m_originalGraph = nullptr;
103  PostProcessType m_ppType = PostProcessType::None;
104 
106  void deriveFaceCluster(ClusterPlanRep& CPR, CombinatorialEmbedding& E, const ClusterGraph& CG,
107  FaceArray<node>& nodeOfFace, NodeArray<cluster>& clusterOfFaceNode);
108 
109 
110  //debug
111  void writeDual(const char* fileName);
112  void writeGML(std::ostream& os, const Layout& drawing);
113 };
114 
115 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::ClusterPlanRep
Planarized representations for clustered graphs.
Definition: ClusterPlanRep.h:56
ogdf::CPlanarEdgeInserter::PostProcessType
PostProcessType
Postprocessing options.
Definition: CPlanarEdgeInserter.h:59
ogdf::SList
Singly linked lists (maintaining the length of the list).
Definition: SList.h:845
ogdf::CPlanarEdgeInserter::m_dualGraph
Graph m_dualGraph
Definition: CPlanarEdgeInserter.h:100
ogdf::CPlanarEdgeInserter::~CPlanarEdgeInserter
virtual ~CPlanarEdgeInserter()
Definition: CPlanarEdgeInserter.h:64
ogdf::CPlanarEdgeInserter::getPostProcessing
PostProcessType getPostProcessing()
Definition: CPlanarEdgeInserter.h:71
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
SList.h
Declaration of singly linked lists and iterators.
ogdf::List< edge >
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::CPlanarEdgeInserter::m_eStatus
EdgeArray< int > m_eStatus
Status of dual graph arcs.
Definition: CPlanarEdgeInserter.h:101
ogdf::FaceArrayBase
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
Definition: CombinatorialEmbedding.h:181
ogdf::CPlanarEdgeInserter
Edge insertion algorithm for clustered graphs.
Definition: CPlanarEdgeInserter.h:57
basic.h
Basic declarations, included by all source files.
CombinatorialEmbedding.h
Declaration of CombinatorialEmbedding and face.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
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
ClusterGraph.h
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
ogdf::CPlanarEdgeInserter::m_arcOrig
EdgeArray< adjEntry > m_arcOrig
Original edges adj entry.
Definition: CPlanarEdgeInserter.h:102
ogdf::CPlanarEdgeInserter::CPlanarEdgeInserter
CPlanarEdgeInserter()
Definition: CPlanarEdgeInserter.h:62
ogdf::IntersectionType::None
@ None
Two geometric objects do not intersect.
ogdf::ClusterGraph
Representation of clustered graphs.
Definition: ClusterGraph.h:346
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::CPlanarEdgeInserter::setPostProcessing
void setPostProcessing(PostProcessType p)
Definition: CPlanarEdgeInserter.h:69
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716