Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

CPlanarEdgeInserter.h
Go to the documentation of this file.
1 
37 #pragma once
38 
40 
41 namespace ogdf {
42 
44 
48 {
50  enum class PostProcessType {None, RemoveReinsert};
51 
52 public:
53 
55 
56  virtual ~CPlanarEdgeInserter() { }
57 
58  void call(
59  ClusterPlanRep& CPR,
61  const Graph& G,
62  const List<edge>& origEdges);
63 
65  {
66  m_ppType = p;
67  }
68 
69  PostProcessType getPostProcessing() { return m_ppType; }
70 
71 protected:
72 
73  void constructDualGraph(
74  ClusterPlanRep& CPR,
76  EdgeArray<edge>& arcRightToLeft,
77  EdgeArray<edge>& arcLeftToRight,
78  FaceArray<node>& nodeOfFace,
79  //NodeArray<face>& faceOfNode,
80  EdgeArray<edge>& arcTwin);
81 
82  void findShortestPath(
83  const CombinatorialEmbedding &E,
84  node s, //edge startpoint
85  node t, //edge endpoint
86  node sDummy, //representing s in network
87  node tDummy, //representing t in network
88  SList<adjEntry> &crossed,
89  FaceArray<node>& nodeOfFace);
90 
91  void insertEdge(
92  ClusterPlanRep &CPR,
94  edge insertMe,
95  FaceArray<node>& nodeOfFace,
96  EdgeArray<edge>& arcRightToLeft,
97  EdgeArray<edge>& arcLeftToRight,
98  EdgeArray<edge>& arcTwin,
99  NodeArray<cluster>& clusterOfFaceNode,
100  const SList<adjEntry> &crossed);
101 
102  void setArcStatus(
103  edge eArc,
104  node oSrc,
105  node oTgt,
106  const ClusterGraph& CG,
107  NodeArray<cluster>& clusterOfFaceNode,
108  EdgeArray<edge>& arcTwin);
109 
111  void postProcess();
112 
113 private:
114 
115  const Graph* m_originalGraph = nullptr;
120 
122  void deriveFaceCluster(
123  ClusterPlanRep& CPR,
125  const ClusterGraph& CG,
126  FaceArray<node>& nodeOfFace,
127  NodeArray<cluster>& clusterOfFaceNode);
128 
129 
130  //debug
131  void writeDual(const char *fileName);
132  void writeGML(std::ostream &os, const Layout &drawing);
133 };
134 
135 }
EdgeArray< int > m_eStatus
Status of dual graph arcs.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Edge insertion algorithm for clustered graphs.
PostProcessType getPostProcessing()
Declaration of ClusterPlanRep class, allowing cluster boundary insertion and shortest path edge inser...
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
Singly linked lists (maintaining the length of the list).
Definition: SList.h:773
void setPostProcessing(PostProcessType p)
Representation of clustered graphs.
Definition: ClusterGraph.h:291
Dynamic arrays indexed with faces of a combinatorial embedding.
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
PostProcessType
Postprocessing options.
EdgeArray< adjEntry > m_arcOrig
Original edges adj entry.
Class for the representation of edges.
Definition: Graph_d.h:292
Planarized representations for clustered graphs.
Class for the representation of nodes.
Definition: Graph_d.h:169
Two geometric objects do not intersect.
The namespace for all OGDF objects.
Combinatorial embeddings of planar graphs with modification functionality.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46