Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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 
65  ~Layout() { }
66 
67 
71  const NodeArray<double> &x() const { return m_x; }
72 
76  NodeArray<double> &x() { return m_x; }
77 
81  const NodeArray<double> &y() const { return m_y; }
82 
86  NodeArray<double> &y() { return m_y; }
87 
88 
92  const double &x(node v) const { return m_x[v]; }
93 
97  double &x(node v) { return m_x[v]; }
98 
102  const double &y(node v) const { return m_y[v]; }
103 
107  double &y(node v) { return m_y[v]; }
108 
112  const DPolyline &bends(edge e) const { return m_bends[e]; }
113 
117  DPolyline &bends(edge e) { return m_bends[e]; }
118 
119 
127  void computePolyline(GraphCopy &GC, edge eOrig, DPolyline &dpl) const;
128 
141  void computePolylineClear(PlanRep &PG, edge eOrig, DPolyline &dpl);
142 
144 
149  DPoint computeBoundingBox(PlanRep &PG) const;
150 
153 private:
157 
159 };
160 
161 
162 } // end namespace ogdf
const double & x(node v) const
Returns the x-coordinate of node v.
Definition: Layout.h:92
NodeArray< double > m_x
The x-coordinates of nodes.
Definition: Layout.h:154
Declaration of class GraphAttributes which extends a Graph by additional attributes.
EdgeArray< DPolyline > m_bends
The bend points of edges.
Definition: Layout.h:156
double & x(node v)
Returns the x-coordinate of node v.
Definition: Layout.h:97
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#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:81
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
Polylines with real coordinates.
Definition: geometry.h:350
double & y(node v)
Returns the y-coordinate of node v.
Definition: Layout.h:107
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
DPolyline & bends(edge e)
Returns the bend point list of edge e.
Definition: Layout.h:117
Layout(const Graph &G)
Creates a layout associated with graph G.
Definition: Layout.h:62
Real points.
Definition: geometry.h:219
const NodeArray< double > & x() const
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:71
NodeArray< double > & y()
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:86
const DPolyline & bends(edge e) const
Returns the bend point list of edge e.
Definition: Layout.h:112
const double & y(node v) const
Returns the y-coordinate of node v.
Definition: Layout.h:102
Declaration of graph copy classes.
Class for the representation of edges.
Definition: Graph_d.h:291
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:250
Class for the representation of nodes.
Definition: Graph_d.h:167
NodeArray< double > & x()
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:76
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:155
~Layout()
Destruction.
Definition: Layout.h:65
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46