Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Layout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
36 #include <ogdf/basic/geometry.h>
37 #include <ogdf/basic/memory.h>
38 
39 namespace ogdf {
40 
41 class GraphCopy;
42 class PlanRep;
43 
50 public:
54  Layout() { }
55 
64  explicit Layout(const Graph& G) : m_x(G, 0), m_y(G, 0), m_bends(G) { }
65 
69  const NodeArray<double>& x() const { return m_x; }
70 
74  NodeArray<double>& x() { return m_x; }
75 
79  const NodeArray<double>& y() const { return m_y; }
80 
84  NodeArray<double>& y() { return m_y; }
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 
123  void computePolyline(GraphCopy& GC, edge eOrig, DPolyline& dpl) const;
124 
137  void computePolylineClear(PlanRep& PG, edge eOrig, DPolyline& dpl);
138 
140 
145  DPoint computeBoundingBox(PlanRep& PG) const;
146 
149 private:
153 
155 };
156 
157 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::Layout::y
const NodeArray< double > & y() const
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:79
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
ogdf::Layout::y
const double & y(node v) const
Returns the y-coordinate of node v.
Definition: Layout.h:99
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::Layout::x
const NodeArray< double > & x() const
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:69
ogdf::Layout::m_bends
EdgeArray< DPolyline > m_bends
The bend points of edges.
Definition: Layout.h:152
ogdf::GenericPolyline
Polylines with PointType points.
Definition: geometry.h:261
ogdf::Layout::bends
DPolyline & bends(edge e)
Returns the bend point list of edge e.
Definition: Layout.h:114
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::Layout::y
NodeArray< double > & y()
Returns a reference to the array storing y-coordinates of nodes.
Definition: Layout.h:84
ogdf::Layout::y
double & y(node v)
Returns the y-coordinate of node v.
Definition: Layout.h:104
ogdf::Layout::bends
const DPolyline & bends(edge e) const
Returns the bend point list of edge e.
Definition: Layout.h:109
ogdf::Layout::x
double & x(node v)
Returns the x-coordinate of node v.
Definition: Layout.h:94
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::Layout::Layout
Layout()
Creates a layout associated with no graph.
Definition: Layout.h:54
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:92
ogdf::Layout::x
NodeArray< double > & x()
Returns a reference to the array storing x-coordinates of nodes.
Definition: Layout.h:74
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::Layout::m_y
NodeArray< double > m_y
The y-coordinates of nodes.
Definition: Layout.h:151
basic.h
Basic declarations, included by all source files.
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:64
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::Layout::m_x
NodeArray< double > m_x
The x-coordinates of nodes.
Definition: Layout.h:150
memory.h
Declaration of memory manager for allocating small pieces of memory.
ogdf::Layout::x
const double & x(node v) const
Returns the x-coordinate of node v.
Definition: Layout.h:89
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716