13 ori(anori), dir(adir),
27 Q_ASSERT(!a && !b || a && b && (a->
dir==b->
dir));
94 if (!*
this)
return *
this;
96 Q_ASSERT(l->ori==h->ori);
110 Q_ASSERT(l->ori==h->ori);
113 Q_ASSERT(l->dir==b.
l->
dir);
115 if (l->ori == b.
l->
ori) {
123 Q_ASSERT(l->ori != b.
l->
ori);
143 frechet::reach::PointerInterval::operator bool()
const {
164 return - (c1 ? c1 : c2);
206 Q_ASSERT(!p->
l || !p->
h);
218 Q_ASSERT(p->
dir != q->
dir);
250 if (p==
l || p==
h)
return true;
261 {
"B",
"T" }, {
"L",
"R" }
282 int i=0;
int imax=10;
283 for( ; p && i < imax; p=p->
next(), ++i)
285 if (i > 0) out <<
",";
287 if (i==0) out<<
" "<<p->
lower();
288 out <<
".."<< p->
upper();
294 if (i >= imax && list.
size() > imax)
295 out <<
"...(" << (list.
size()-imax)<<
")";
bool empty_see_through_interval(Pointer p)
test intersection of intervals. Assumes a SEE_THROUGH segment.
Pointer max(const Pointer a, const Pointer b)
maximum of two reachability intervals; compare lower bound, then upper bound
void swap(gpuword **A, gpuword **B)
Pointer min(const Pointer a, const Pointer b)
minimum of two reachability intervals; compare lower bound, then upper bound
PointerInterval operator+(const PointerInterval &that) const
merge operator
clockwise interval (bottom-then-left)
void clear()
clear both pointer (assgin nullptr)
Point normalized(Point p)
normalize a vector to unit length
PointerInterval & swap(bool doit=true)
conditional swap
see-through: other interals are visible with a straight line
global definitions for all algorithms.
PointerInterval swapped() const
const Orientation ori
horizontal or vertical
Direction
direction of a Pointer inside the reachability structure.
static std::string DIRECTION[2][2]
struct frechet::reach::BoundarySegment::@4 temp
temporary data used during merge and split operations
boundary interval in the reachability structure. Represents an interval on the boundary of the FreeSp...
describes l,h pointers. Both pointers are assumed to point into the same rectangle section (right-top...
PointerInterval()
empty constructor; constructs an invalid interval, with both pointers being nullptr
int compare_pointers(Pointer a, Pointer b)
compare two pointers on opposite parts of a reachability structure (eitehr left->right-top,...
int compare(double a, double b)
comparator function
BoundarySegment * Pointer
(dumb) pointer to a BoundarySegment object
Type type
reachability label
PointerInterval normalized() const
assumes identical orientation !!
std::ostream & operator<<(std::ostream &out, const BoundaryList &list)
print operator for debugging
PointerInterval & operator=(const Pointer &p)
assigment
Orientation
Segment Orientation.
const Direction dir
left/right or bottom/top
Pointer l
points to the lowest segment of the interval
int compare_interval(Pointer a, Pointer b)
compare two pointers in the same part of a reachability structure (either right-top,...
bool contains(Pointer p) const
containment test
BoundarySegment(const Interval &ival, Orientation ori, Direction dir, Type t, void *owner=nullptr)
default constructor
Pointer h
points to the highest segment of the interval
first segment = bottom and left edge
base template for elements of a LinkedList
an interval of two double values.
static std::string TYPE[3]
const std::string direction(Pointer p)
bool empty_interval(Pointer a, Pointer b)
test intersection of intervals