Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 public:
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 
120  void computePolyline(GraphCopy& GC, edge eOrig, DPolyline& dpl) const;
121 
134  void computePolylineClear(PlanRep& PG, edge eOrig, DPolyline& dpl);
135 
137 
142  DPoint computeBoundingBox(PlanRep& PG) const;
143 
146 private:
150 
152 };
153 
154 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::Layout::y
const NodeArray< double > & y() const
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:76
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ogdf::GenericPoint< double >
ogdf::Layout::y
const double & y(node v) const
Returns the y-coordinate of node v.
Definition: Layout.h:96
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
ogdf::Layout::x
const NodeArray< double > & x() const
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:66
ogdf::Layout::m_bends
EdgeArray< DPolyline > m_bends
The bend points of edges.
Definition: Layout.h:149
ogdf::GenericPolyline
Polylines with PointType points.
Definition: geometry.h:254
ogdf::Layout::bends
DPolyline & bends(edge e)
Returns the bend point list of edge e.
Definition: Layout.h:111
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:384
ogdf::Layout::y
NodeArray< double > & y()
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:81
ogdf::Layout::y
double & y(node v)
Returns the y-coordinate of node v.
Definition: Layout.h:101
ogdf::Layout::bends
const DPolyline & bends(edge e) const
Returns the bend point list of edge e.
Definition: Layout.h:106
ogdf::Layout::x
double & x(node v)
Returns the x-coordinate of node v.
Definition: Layout.h:91
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
ogdf::Layout::Layout
Layout()
Creates a layout associated with no graph.
Definition: Layout.h:51
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
ogdf::Layout::x
NodeArray< double > & x()
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:71
GraphCopy.h
Declaration of graph copy classes.
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
ogdf::Layout::m_y
NodeArray< double > m_y
The y-coordinates of nodes.
Definition: Layout.h:148
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::Layout::Layout
Layout(const Graph &G)
Creates a layout associated with graph G.
Definition: Layout.h:61
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::Layout::m_x
NodeArray< double > m_x
The x-coordinates of nodes.
Definition: Layout.h:147
ogdf::Layout::x
const double & x(node v) const
Returns the x-coordinate of node v.
Definition: Layout.h:86
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709