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

Detailed Description

a range of node indices in a Reachability Graph

Author
Peter Schäfer

Definition at line 17 of file graph_model.h.

#include <graph_model.h>

Public Member Functions

 IndexRange ()
 empty constructor More...
 
 IndexRange (Orientation ori, int l, int u)
 default constructor More...
 
bool empty () const
 
void clear ()
 clear range More...
 
int len () const
 
bool contains (int i) const
 containment test More...
 
bool contains (const IndexRange &that) const
 containment test More...
 
bool operator== (const IndexRange &that) const
 comparison operator More...
 
bool operator!= (const IndexRange &that) const
 comparison operator More...
 
IndexRange operator+ (const IndexRange &b) const
 union operator More...
 
IndexRange operator+ (int offset) const
 shift operator More...
 
IndexRange operator- (int offset) const
 shift operator More...
 
IndexRange operator & (const IndexRange &b) const
 intersection operator More...
 
IndexRangeoperator+= (const IndexRange &b)
 union operator More...
 
IndexRangeoperator-= (int offset)
 shift operator More...
 
IndexRangeoperator&= (const IndexRange &b)
 intersection operator More...
 
bool intersects (const IndexRange &b) const
 intersection test More...
 

Public Attributes

Orientation ori
 horizontal or vertical part of the reachability structure? More...
 
int lower
 lower index (inclusive) More...
 
int upper
 upper index (exclusive) More...
 

Constructor & Destructor Documentation

◆ IndexRange() [1/2]

IndexRange::IndexRange ( )

empty constructor

Definition at line 10 of file graph_model.cpp.

◆ IndexRange() [2/2]

frechet::reach::IndexRange::IndexRange ( Orientation  ori,
int  l,
int  u 
)

default constructor

Parameters
orihorizontal or vertical part of the reachability structure?
llower index (inclusive)
uupper index (exclusive)

Member Function Documentation

◆ clear()

void IndexRange::clear ( )

clear range

Definition at line 19 of file graph_model.cpp.

◆ contains() [1/2]

bool IndexRange::contains ( int  i) const

containment test

Parameters
ia node index
Returns
true, if the the node is within the range

Definition at line 26 of file graph_model.cpp.

◆ contains() [2/2]

bool IndexRange::contains ( const IndexRange that) const

containment test

Parameters
thatanother range
Returns
true, if 'that' is contained in 'this'

Definition at line 30 of file graph_model.cpp.

◆ empty()

bool IndexRange::empty ( ) const
Returns
true if the range is empty

Definition at line 18 of file graph_model.cpp.

◆ intersects()

bool IndexRange::intersects ( const IndexRange b) const

intersection test

Parameters
banother range
Returns
true if both ranges intersect

Definition at line 52 of file graph_model.cpp.

◆ len()

int IndexRange::len ( ) const
Returns
number of nodes in range

Definition at line 21 of file graph_model.cpp.

◆ operator &()

IndexRange IndexRange::operator & ( const IndexRange b) const

intersection operator

Parameters
banother range, required to have the same orientation
Returns
intersection of both ranges, undefined if orientation differs

Definition at line 36 of file graph_model.cpp.

◆ operator!=()

bool IndexRange::operator!= ( const IndexRange that) const

comparison operator

Parameters
thatanother range
Returns
true, if 'that' is not equal to 'this'

Definition at line 75 of file graph_model.cpp.

◆ operator&=()

IndexRange & IndexRange::operator&= ( const IndexRange b)

intersection operator

Parameters
banother range, required to have the same orientation
Returns
reference to this, after being update to the intersection of both ranges

Definition at line 44 of file graph_model.cpp.

◆ operator+() [1/2]

IndexRange IndexRange::operator+ ( const IndexRange b) const

union operator

Parameters
banother range, required to be adjacent to this range
Returns
the union of both ranges, undefined if the ranges are not adjacent

Definition at line 59 of file graph_model.cpp.

◆ operator+() [2/2]

IndexRange IndexRange::operator+ ( int  offset) const

shift operator

Parameters
offsetoffset to apply to the range
Returns
a copy of this, shifted by offset

Definition at line 80 of file graph_model.cpp.

◆ operator+=()

IndexRange & IndexRange::operator+= ( const IndexRange b)

union operator

Parameters
banother range, required to be adjacent to this range
Returns
reference to this, after being updated

Definition at line 90 of file graph_model.cpp.

◆ operator-()

IndexRange IndexRange::operator- ( int  offset) const

shift operator

Parameters
offsetoffset to apply to the range
Returns
a copy of this, shifted by offset

Definition at line 85 of file graph_model.cpp.

◆ operator-=()

IndexRange & IndexRange::operator-= ( int  offset)

shift operator

Parameters
offsetoffset to apply to the range
Returns
reference to this, after being shifted

Definition at line 98 of file graph_model.cpp.

◆ operator==()

bool IndexRange::operator== ( const IndexRange that) const

comparison operator

Parameters
thatanother range
Returns
true, if 'that' is equal to 'this'

Definition at line 68 of file graph_model.cpp.

Member Data Documentation

◆ lower

int frechet::reach::IndexRange::lower

lower index (inclusive)

Definition at line 21 of file graph_model.h.

◆ ori

Orientation frechet::reach::IndexRange::ori

horizontal or vertical part of the reachability structure?

Definition at line 19 of file graph_model.h.

◆ upper

int frechet::reach::IndexRange::upper

upper index (exclusive)

Definition at line 23 of file graph_model.h.


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