Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
47namespace ogdf {
48class ClusterPlanRep;
49class Layout;
50template<class E>
51class List;
52
54
59 enum class PostProcessType { None, RemoveReinsert };
60
61public:
63
65
67 const List<edge>& origEdges);
68
69 void setPostProcessing(PostProcessType p) { m_ppType = p; }
70
71 PostProcessType getPostProcessing() { return m_ppType; }
72
73protected:
75 EdgeArray<edge>& arcRightToLeft, EdgeArray<edge>& arcLeftToRight,
76 FaceArray<node>& nodeOfFace,
77 //NodeArray<face>& faceOfNode,
78 EdgeArray<edge>& arcTwin);
79
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
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
97
98private:
99 const Graph* m_originalGraph = nullptr;
103 PostProcessType m_ppType = PostProcessType::None;
104
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}
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Declaration of CombinatorialEmbedding and face.
Includes declaration of graph class.
Declaration of singly linked lists and iterators.
Basic declarations, included by all source files.
Edge insertion algorithm for clustered graphs.
PostProcessType getPostProcessing()
void writeGML(std::ostream &os, const Layout &drawing)
EdgeArray< int > m_eStatus
Status of dual graph arcs.
EdgeArray< adjEntry > m_arcOrig
Original edges adj entry.
PostProcessType
Postprocessing options.
void setArcStatus(edge eArc, node oSrc, node oTgt, const ClusterGraph &CG, NodeArray< cluster > &clusterOfFaceNode, EdgeArray< edge > &arcTwin)
void setPostProcessing(PostProcessType p)
void constructDualGraph(ClusterPlanRep &CPR, CombinatorialEmbedding &E, EdgeArray< edge > &arcRightToLeft, EdgeArray< edge > &arcLeftToRight, FaceArray< node > &nodeOfFace, EdgeArray< edge > &arcTwin)
void writeDual(const char *fileName)
void deriveFaceCluster(ClusterPlanRep &CPR, CombinatorialEmbedding &E, const ClusterGraph &CG, FaceArray< node > &nodeOfFace, NodeArray< cluster > &clusterOfFaceNode)
Compute for every face the cluster that surrounds it.
void findShortestPath(const CombinatorialEmbedding &E, node s, node t, node sDummy, node tDummy, SList< adjEntry > &crossed, FaceArray< node > &nodeOfFace)
void postProcess()
Use heuristics to improve the result if possible.
void insertEdge(ClusterPlanRep &CPR, CombinatorialEmbedding &E, edge insertMe, FaceArray< node > &nodeOfFace, EdgeArray< edge > &arcRightToLeft, EdgeArray< edge > &arcLeftToRight, EdgeArray< edge > &arcTwin, NodeArray< cluster > &clusterOfFaceNode, const SList< adjEntry > &crossed)
void call(ClusterPlanRep &CPR, CombinatorialEmbedding &E, const Graph &G, const List< edge > &origEdges)
Representation of clustered graphs.
Planarized representations for clustered graphs.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
Definition Graph_d.h:364
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:49
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
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.
@ None
Two geometric objects do not intersect.