|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
77 const int&
x(
node v)
const {
return m_x[v]; }
80 int&
x(
node v) {
return m_x[v]; }
83 const int&
y(
node v)
const {
return m_y[v]; }
86 int&
y(
node v) {
return m_y[v]; }
115 void compactAllBends();
137 void computeBoundingBox(
int& xmin,
int& xmax,
int& ymin,
int& ymax);
140 int totalManhattanEdgeLength()
const;
142 int maxManhattanEdgeLength()
const;
143 int manhattanEdgeLength(
edge e)
const;
146 double totalEdgeLength()
const;
149 int numberOfBends()
const;
157 virtual void remap(
Layout& drawing);
159 static int manhattanDistance(
const IPoint& ip1,
const IPoint& ip2);
160 static double euclideanDistance(
const IPoint& ip1,
const IPoint& ip2);
The namespace for all OGDF objects.
const IPolyline & bends(edge e) const
Returns a reference to the bend point list of edge e.
int & y(node v)
Returns a reference to the y-coordinate of node v.
Includes declaration of graph class.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Polylines with PointType points.
const NodeArray< int > & y() const
Returns a reference to the array storing the y-coordinates of nodes.
const NodeArray< int > & x() const
Returns a reference to the array storing the x-coordinates of nodes.
const int & y(node v) const
Returns a reference to the y-coordinate of node v.
virtual ~GridLayout()
Destruction.
EdgeArray< IPolyline > & bends()
Returns a reference to the array storing the bend points of edges.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
const EdgeArray< IPolyline > & bends() const
Returns a reference to the array storing the bend points of edges.
IPolyline & bends(edge e)
Returns a reference to the bend point list of edge e.
GridLayout(const Graph &G)
Creates an instance of a grid layout associated with G.
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
void init(const Graph &G)
Initializes the grid layout for graph G.
NodeArray< int > & y()
Returns a reference to the array storing the y-coordinates of nodes.
NodeArray< int > & x()
Returns a reference to the array storing the x-coordinates of nodes.
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
const int & x(node v) const
Returns a reference to the x-coordinate of node v.
NodeArray< int > m_x
The x-coordinates of nodes.
int & x(node v)
Returns a reference to the x-coordinate of node v.
Class for the representation of edges.
Representation of a graph's grid layout.
void init()
Initializes the grid layout for no graph (frees memory).
GridLayout()
Creates an instance of a grid layout (associated with no graph).
NodeArray< int > m_y
The y-coordinates of nodes.
Class for the representation of nodes.
EdgeArray< IPolyline > m_bends
The bend points of edges.
Declaration of memory manager for allocating small pieces of memory.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.