Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::reach::PointerInterval Struct Reference

Detailed Description

describes l,h pointers. Both pointers are assumed to point into the same rectangle section (right-top OR bottom-left)

See also
[alt95]

Definition at line 160 of file boundary.h.

#include <boundary.h>

Inherited by frechet::reach::BoundarySegment.

Public Member Functions

 PointerInterval ()
 empty constructor; constructs an invalid interval, with both pointers being nullptr More...
 
 PointerInterval (Pointer a, Pointer b)
 default constructor More...
 
 operator bool () const
 true if the interal is valid, i.e. both pointers are More...
 
bool operator! () const
 
PointerIntervaloperator= (const Pointer &p)
 assigment More...
 
PointerIntervalswap (bool doit=true)
 conditional swap More...
 
PointerInterval swapped () const
 
bool contains (Pointer p) const
 containment test More...
 
PointerInterval normalized () const
 assumes identical orientation !! More...
 
PointerInterval operator+ (const PointerInterval &that) const
 merge operator More...
 
bool operator== (const PointerInterval &that) const
 comparison operator More...
 
void clear ()
 clear both pointer (assgin nullptr) More...
 

Public Attributes

Pointer l
 points to the lowest segment of the interval More...
 
Pointer h
 points to the highest segment of the interval More...
 

Constructor & Destructor Documentation

◆ PointerInterval() [1/2]

PointerInterval::PointerInterval ( )

empty constructor; constructs an invalid interval, with both pointers being nullptr

Definition at line 22 of file boundary.cpp.

◆ PointerInterval() [2/2]

PointerInterval::PointerInterval ( Pointer  a,
Pointer  b 
)

default constructor

pointers are assumed in same direction

Parameters
alowest segment
bhighest segment

Definition at line 25 of file boundary.cpp.

Member Function Documentation

◆ clear()

void PointerInterval::clear ( )

clear both pointer (assgin nullptr)

Definition at line 255 of file boundary.cpp.

◆ contains()

bool PointerInterval::contains ( Pointer  p) const

containment test

Parameters
pa pointer to a segment
Returns
true, if p points to a segment inbetween l and h

Definition at line 248 of file boundary.cpp.

◆ normalized()

PointerInterval frechet::reach::PointerInterval::normalized ( ) const

assumes identical orientation !!

Returns
a copy of this interval, with proper order of l,h pointers. i.e. l <= h for vertical intervals and l >= h for horizontal intervals

Definition at line 92 of file boundary.cpp.

◆ operator bool()

frechet::reach::PointerInterval::operator bool ( ) const

true if the interal is valid, i.e. both pointers are

Definition at line 143 of file boundary.cpp.

◆ operator!()

bool PointerInterval::operator! ( ) const
Returns
true if the interal is ibvalid, i.e. at least one pointers is

Definition at line 30 of file boundary.cpp.

◆ operator+()

PointerInterval frechet::reach::PointerInterval::operator+ ( const PointerInterval that) const

merge operator

assumes identical orientation !!

Parameters
thatinterval to merge with
Returns
a copy of this interval, merged with 'that'

Definition at line 105 of file boundary.cpp.

◆ operator=()

PointerInterval & PointerInterval::operator= ( const Pointer p)

assigment

Parameters
pobject to assign from
Returns
this, after assigment

Definition at line 34 of file boundary.cpp.

◆ operator==()

bool frechet::reach::PointerInterval::operator== ( const PointerInterval that) const
inline

comparison operator

Parameters
thatinterval to compare with
Returns
true if both pointers are equal

Definition at line 214 of file boundary.h.

◆ swap()

PointerInterval & PointerInterval::swap ( bool  doit = true)

conditional swap

Parameters
doitif true, replace l and h pointers
Returns
this, conditionally with swapped pointers

Definition at line 39 of file boundary.cpp.

◆ swapped()

PointerInterval PointerInterval::swapped ( ) const
Returns
a PointerInterval(h,l) object with swapped pointers

Definition at line 44 of file boundary.cpp.

Member Data Documentation

◆ h

Pointer frechet::reach::PointerInterval::h

points to the highest segment of the interval

Definition at line 162 of file boundary.h.

◆ l

Pointer frechet::reach::PointerInterval::l

points to the lowest segment of the interval

Definition at line 161 of file boundary.h.


The documentation for this struct was generated from the following files: