76 const int&
x(
node v)
const {
return m_x[v]; }
79 int&
x(
node v) {
return m_x[v]; }
82 const int&
y(
node v)
const {
return m_y[v]; }
85 int&
y(
node v) {
return m_y[v]; }
Declaration and implementation of EdgeArray class.
Declaration of class Layout.
Declaration and implementation of NodeArray class.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Dynamic arrays indexed with edges.
Class for the representation of edges.
Polylines with PointType points.
Data type for general directed graphs (adjacency list representation).
Representation of a graph's grid layout.
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.
int totalManhattanEdgeLength() const
Computes the total manhattan edge length of the grid layout.
GridLayout(const Graph &G)
Creates an instance of a grid layout associated with G.
int & x(node v)
Returns a reference to the x-coordinate of node v.
GridLayout()
Creates an instance of a grid layout (associated with no graph).
void compactAllBends()
Removes all unnecessary bends.
int & y(node v)
Returns a reference to the y-coordinate of node v.
NodeArray< int > m_x
The x-coordinates of nodes.
const int & y(node v) const
Returns a reference to the y-coordinate of node v.
void computeBoundingBox(int &xmin, int &xmax, int &ymin, int &ymax)
Computes the bounding box of the grid layout.
EdgeArray< IPolyline > m_bends
The bend points of edges.
const EdgeArray< IPolyline > & bends() const
Returns a reference to the array storing the bend points of edges.
const int & x(node v) const
Returns a reference to the x-coordinate of node v.
int numberOfBends() const
Computes the total number of bends in the grid layout.
bool checkLayout()
Checks if the grid layout is reasonable.
int maxManhattanEdgeLength() const
virtual ~GridLayout()
Destruction.
virtual void remap(Layout &drawing)
Transforms the grid layout to a layout.
double totalEdgeLength() const
Computes the total (euclidean) edge length of the grid layout.
static bool isRedundant(IPoint &p1, IPoint &p2, IPoint &p3)
int manhattanEdgeLength(edge e) const
void init()
Initializes the grid layout for no graph (frees memory).
IPolyline & bends(edge e)
Returns a reference to the bend point list of edge e.
EdgeArray< IPolyline > & bends()
Returns a reference to the array storing the bend points of edges.
void init(const Graph &G)
Initializes the grid layout for graph G.
static int manhattanDistance(const IPoint &ip1, const IPoint &ip2)
static void compact(IPolyline &ip)
const IPolyline & bends(edge e) const
Returns a reference to the bend point list of edge e.
static double euclideanDistance(const IPoint &ip1, const IPoint &ip2)
IPolyline getCompactBends(edge e) const
Returns the bend point list of edge e without unnecessary bends.
NodeArray< int > m_y
The y-coordinates of nodes.
NodeArray< int > & y()
Returns a reference to the array storing the y-coordinates of nodes.
IPolyline polyline(edge e) const
Returns the polyline of edge e (including start and end point!).
NodeArray< int > & x()
Returns a reference to the array storing the x-coordinates of nodes.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.