Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
Layout.h
Go to the documentation of this file.
1
32#pragma once
33
36
37namespace ogdf {
38
39class PlanRep;
40
47public:
51 Layout() { }
52
61 explicit Layout(const Graph& G) : m_x(G, 0), m_y(G, 0), m_bends(G) { }
62
66 const NodeArray<double>& x() const { return m_x; }
67
71 NodeArray<double>& x() { return m_x; }
72
76 const NodeArray<double>& y() const { return m_y; }
77
81 NodeArray<double>& y() { return m_y; }
82
86 const double& x(node v) const { return m_x[v]; }
87
91 double& x(node v) { return m_x[v]; }
92
96 const double& y(node v) const { return m_y[v]; }
97
101 double& y(node v) { return m_y[v]; }
102
106 const DPolyline& bends(edge e) const { return m_bends[e]; }
107
111 DPolyline& bends(edge e) { return m_bends[e]; }
112
121
135
137
143
146private:
150
152};
153
154}
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration of graph copy classes.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Class for the representation of edges.
Definition Graph_d.h:300
Polylines with PointType points.
Definition geometry.h:253
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:254
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:46
DPolyline & bends(edge e)
Returns the bend point list of edge e.
Definition Layout.h:111
const NodeArray< double > & y() const
Returns a reference to the array storing y-coordinates of nodes.
Definition Layout.h:76
EdgeArray< DPolyline > m_bends
The bend points of edges.
Definition Layout.h:149
const DPolyline & bends(edge e) const
Returns the bend point list of edge e.
Definition Layout.h:106
NodeArray< double > & x()
Returns a reference to the array storing x-coordinates of nodes.
Definition Layout.h:71
double & y(node v)
Returns the y-coordinate of node v.
Definition Layout.h:101
void computePolylineClear(PlanRep &PG, edge eOrig, DPolyline &dpl)
Returns the polyline of edge eOrig in dpl and clears the bend points of the copies.
Layout()
Creates a layout associated with no graph.
Definition Layout.h:51
NodeArray< double > m_y
The y-coordinates of nodes.
Definition Layout.h:148
NodeArray< double > m_x
The x-coordinates of nodes.
Definition Layout.h:147
double & x(node v)
Returns the x-coordinate of node v.
Definition Layout.h:91
void computePolyline(GraphCopy &GC, edge eOrig, DPolyline &dpl) const
Returns the polyline of edge eOrig in dpl.
Layout(const Graph &G)
Creates a layout associated with graph G.
Definition Layout.h:61
const double & x(node v) const
Returns the x-coordinate of node v.
Definition Layout.h:86
const double & y(node v) const
Returns the y-coordinate of node v.
Definition Layout.h:96
const NodeArray< double > & x() const
Returns a reference to the array storing x-coordinates of nodes.
Definition Layout.h:66
NodeArray< double > & y()
Returns a reference to the array storing y-coordinates of nodes.
Definition Layout.h:81
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition memory.h:91
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.