Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::data::Spirolator Class Reference

Detailed Description

an integer iterator that goes in "spirals", like this:

 i, i+1, i-1, i+2, i-2, ...

It is used for searching a range of numbers, preferring values "in the middle".

Author
Peter Schäfer

Definition at line 16 of file spirolator.h.

#include <spirolator.h>

Public Member Functions

 Spirolator (int amin, int amax)
 constructor with number range More...
 
 operator bool ()
 
 operator int ()
 
Spirolatoroperator++ ()
 advance the iterator More...
 

Private Attributes

int min
 minimum value More...
 
int max
 maximaum value More...
 
int current
 current value More...
 
int increment
 increment for next step More...
 

Constructor & Destructor Documentation

◆ Spirolator()

frechet::data::Spirolator::Spirolator ( int  amin,
int  amax 
)
inline

constructor with number range

Parameters
aminminimum value, inclusive
amaxmaximum value, exclusive

Definition at line 28 of file spirolator.h.

Member Function Documentation

◆ operator bool()

frechet::data::Spirolator::operator bool ( )
inline
Returns
true, if the iterator is in the valid range; false, if it is out of range

Definition at line 34 of file spirolator.h.

◆ operator int()

frechet::data::Spirolator::operator int ( )
inline
Returns
the current value

Definition at line 38 of file spirolator.h.

◆ operator++()

Spirolator& frechet::data::Spirolator::operator++ ( )
inline

advance the iterator

Returns
this object, after being advanced

Definition at line 43 of file spirolator.h.

Member Data Documentation

◆ current

int frechet::data::Spirolator::current
private

current value

Definition at line 20 of file spirolator.h.

◆ increment

int frechet::data::Spirolator::increment
private

increment for next step

Definition at line 21 of file spirolator.h.

◆ max

int frechet::data::Spirolator::max
private

maximaum value

Definition at line 19 of file spirolator.h.

◆ min

int frechet::data::Spirolator::min
private

minimum value

Definition at line 18 of file spirolator.h.


The documentation for this class was generated from the following file: