Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

Layout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/GraphCopy.h>
36 
37 namespace ogdf {
38 
39 class PlanRep;
40 
47 {
48 public:
52  Layout() { }
53 
62  explicit Layout(const Graph &G) : m_x(G,0), m_y(G,0), m_bends(G) { }
63 
64 
68  const NodeArray<double> &x() const { return m_x; }
69 
73  NodeArray<double> &x() { return m_x; }
74 
78  const NodeArray<double> &y() const { return m_y; }
79 
83  NodeArray<double> &y() { return m_y; }
84 
85 
89  const double &x(node v) const { return m_x[v]; }
90 
94  double &x(node v) { return m_x[v]; }
95 
99  const double &y(node v) const { return m_y[v]; }
100 
104  double &y(node v) { return m_y[v]; }
105 
109  const DPolyline &bends(edge e) const { return m_bends[e]; }
110 
114  DPolyline &bends(edge e) { return m_bends[e]; }
115 
116 
124  void computePolyline(GraphCopy &GC, edge eOrig, DPolyline &dpl) const;
125 
138  void computePolylineClear(PlanRep &PG, edge eOrig, DPolyline &dpl);
139 
141 
146  DPoint computeBoundingBox(PlanRep &PG) const;
147 
150 private:
154 
156 };
157 
158 }
const double & x(node v) const
Returns the x-coordinate of node v.
Definition: Layout.h:89
NodeArray< double > m_x
The x-coordinates of nodes.
Definition: Layout.h:151
Declaration of class GraphAttributes which extends a Graph by additional attributes.
EdgeArray< DPolyline > m_bends
The bend points of edges.
Definition: Layout.h:153
double & x(node v)
Returns the x-coordinate of node v.
Definition: Layout.h:94
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
const NodeArray< double > & y() const
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:78
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
double & y(node v)
Returns the y-coordinate of node v.
Definition: Layout.h:104
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
DPolyline & bends(edge e)
Returns the bend point list of edge e.
Definition: Layout.h:114
Layout(const Graph &G)
Creates a layout associated with graph G.
Definition: Layout.h:62
const NodeArray< double > & x() const
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:68
NodeArray< double > & y()
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:83
const DPolyline & bends(edge e) const
Returns the bend point list of edge e.
Definition: Layout.h:109
const double & y(node v) const
Returns the y-coordinate of node v.
Definition: Layout.h:99
Declaration of graph copy classes.
Class for the representation of edges.
Definition: Graph_d.h:292
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:249
Class for the representation of nodes.
Definition: Graph_d.h:169
Polylines with PointType points.
Definition: geometry.h:263
NodeArray< double > & x()
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:73
Layout()
Creates a layout associated with no graph.
Definition: Layout.h:52
The namespace for all OGDF objects.
NodeArray< double > m_y
The y-coordinates of nodes.
Definition: Layout.h:152
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:59
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46