45 namespace davidson_harel {
69 if(l <= m_CellSize/2.0 || l >=
m_CellSize*2.0) resize =
true;
89 return IPoint(
int(x),
int(y));
102 if(d - floor(d) > 0)
return false;
103 if(d < numeric_limits<int>::min() || d > numeric_limits<int>::max())
128 template<
typename TPo
int,
typename TNum>
129 bool crossesCell(TPoint &
A, TPoint &B,
130 TNum xlow, TNum xhigh, TNum ylow, TNum yhigh,
131 const IPoint &CellAdr)
const 134 if (A.m_x == B.m_x) {
135 crosses = A.m_x >= xlow
137 && intervalIntersect(A.m_y, B.m_y, ylow, yhigh);
142 double m = (B.m_y - A.m_y) / (B.m_x - A.m_x);
143 double c = A.m_y - A.m_x * m;
144 double y1 = m * xlow + c;
145 double y2 = m * xhigh + c;
146 crosses = intervalIntersect(A.m_x, B.m_x, xlow, xhigh)
147 && intervalIntersect(min(A.m_y, B.m_y),
150 && intervalIntersect(y1, y2, ylow, yhigh);
160 bool intervalIntersect(
double,
double,
double,
double)
const;
163 int m_maxEdgesPerCell;
Declaration of singly linked lists and iterators.
Declaration of class HashArray2D.
NUMBER m_y
The y-coordinate.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
double height() const
Returns the height of the rectangle.
Data type for general directed graphs (adjacency list representation).
double width() const
Returns the width of the rectangle.
NUMBER m_x
The x-coordinate.
Rectangles with real coordinates.
Dynamic arrays indexed with edges.
Indexed 2-dimensional arrays using hashing for element access.
Singly linked lists (maintaining the length of the list).
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Stores additional attributes of a graph (like layout information).
Class for the representation of edges.
Class for the representation of nodes.
The namespace for all OGDF objects.
Declaration of classes DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Declaration and implementation of class Array2D which implements dynamic two dimensional arrays...