Gecode::Iter::Ranges::RangeListIter Class Reference
Common functionality » Range and value iterators » Range iterators

Iterator over range lists. More...

`#include <ranges-list.hpp>`

## Classes

class | RangeList
| Range list class. More...
class | RLIO
| Shared object for allocation. More...

## Protected Member Functions

void | set (RangeList *l)
| Set range lists.
RangeList * | get (void) const
| Get head of current range list.
RangeList * | range (int min, int max, RangeList *&f)
| Create new range possibly from freelist f and init.
RangeList * | range (int min, int max)
| Create new range possibly and init.
template<class I>
RangeList * | range (I &i, RangeList *&f)
| Create new range possibly from freelist f and init.
template<class I>
RangeList * | range (I &i)
| Create new range possibly and init.
template<class I>
RangeList * | copy (I &i)
| Copy the iterator i to a range list.

## Protected Attributes

RLIO * | rlio
| Reference to shared object.
RangeList * | h
| Head of range list.
RangeList * | c
| Current list element.

## Constructors and initialization

| RangeListIter (void)
| Default constructor.
| RangeListIter (const RangeListIter &i)
| Copy constructor.
| RangeListIter (Region &r)
| Initialize.
void | init (Region &r)
| Initialize.
RangeListIter & | operator= (const RangeListIter &i)
| Assignment operator.

## Iteration control

bool | operator() (void) const
| Test whether iterator is still at a range or done.
void | operator++ (void)
| Move iterator to next range (if possible).
void | reset (void)
| Reset iterator to start.

## Range access

int | min (void) const
| Return smallest value of range.
int | max (void) const
| Return largest value of range.
unsigned int | width (void) const
| Return width of range (distance between minimum and maximum).
| ~RangeListIter (void)
| Destructor.

## Detailed Description

Iterator over range lists.

Definition at line 41 of file ranges-list.hpp.

## Constructor & Destructor Documentation

## RangeListIter() [1/3]

Gecode::Iter::Ranges::RangeListIter::RangeListIter | ( | void |  | ) |

inline

Default constructor.

Definition at line 128 of file ranges-list.hpp.

## RangeListIter() [2/3]

Gecode::Iter::Ranges::RangeListIter::RangeListIter | ( | const RangeListIter & | i | ) |

inline

Copy constructor.

Definition at line 142 of file ranges-list.hpp.

## RangeListIter() [3/3]

Gecode::Iter::Ranges::RangeListIter::RangeListIter | ( | Region & | r | ) |

inline

Initialize.

Definition at line 132 of file ranges-list.hpp.

## ~RangeListIter()

Gecode::Iter::Ranges::RangeListIter::~RangeListIter | ( | void |  | ) |

inline

Destructor.

Definition at line 165 of file ranges-list.hpp.

## Member Function Documentation

## set()

void Gecode::Iter::Ranges::RangeListIter::set | ( | RangeList * | l | ) |

inline protected

Set range lists.

Definition at line 175 of file ranges-list.hpp.

## get()

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::get | ( | void |  | ) | const

inline protected

Get head of current range list.

Definition at line 180 of file ranges-list.hpp.

## range() [1/4]

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::range | ( | int | min,
|  | int | max,
|  | RangeList *& | f )

inline protected

Create new range possibly from freelist f and init.

Definition at line 185 of file ranges-list.hpp.

## range() [2/4]

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::range | ( | int | min,
|  | int | max )

inline protected

Create new range possibly and init.

Definition at line 198 of file ranges-list.hpp.

## range() [3/4]

template<class I>

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::range | ( | I & | i,
|  | RangeList *& | f )

inline protected

Create new range possibly from freelist f and init.

Definition at line 206 of file ranges-list.hpp.

## range() [4/4]

template<class I>

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::range | ( | I & | i | ) |

inline protected

Create new range possibly and init.

Definition at line 212 of file ranges-list.hpp.

## copy()

template<class I>

RangeListIter::RangeList * Gecode::Iter::Ranges::RangeListIter::copy | ( | I & | i | ) |

inline protected

Copy the iterator i to a range list.

Definition at line 218 of file ranges-list.hpp.

## init()

void Gecode::Iter::Ranges::RangeListIter::init | ( | Region & | r | ) |

inline

Initialize.

Definition at line 136 of file ranges-list.hpp.

## operator=()

RangeListIter & Gecode::Iter::Ranges::RangeListIter::operator= | ( | const RangeListIter & | i | ) |

inline

Assignment operator.

Definition at line 149 of file ranges-list.hpp.

## operator()()

bool Gecode::Iter::Ranges::RangeListIter::operator() | ( | void |  | ) | const

inline

Test whether iterator is still at a range or done.

Definition at line 230 of file ranges-list.hpp.

## operator++()

void Gecode::Iter::Ranges::RangeListIter::operator++ | ( | void |  | ) |

inline

Move iterator to next range (if possible).

Definition at line 235 of file ranges-list.hpp.

## reset()

void Gecode::Iter::Ranges::RangeListIter::reset | ( | void |  | ) |

inline

Reset iterator to start.

Definition at line 240 of file ranges-list.hpp.

## min()

int Gecode::Iter::Ranges::RangeListIter::min | ( | void |  | ) | const

inline

Return smallest value of range.

Definition at line 245 of file ranges-list.hpp.

## max()

int Gecode::Iter::Ranges::RangeListIter::max | ( | void |  | ) | const

inline

Return largest value of range.

Definition at line 249 of file ranges-list.hpp.

## width()

unsigned int Gecode::Iter::Ranges::RangeListIter::width | ( | void |  | ) | const

inline

Return width of range (distance between minimum and maximum).

Definition at line 253 of file ranges-list.hpp.

## Member Data Documentation

## rlio

RLIO* Gecode::Iter::Ranges::RangeListIter::rlio

protected

Reference to shared object.

Definition at line 60 of file ranges-list.hpp.

## h

RangeList* Gecode::Iter::Ranges::RangeListIter::h

protected

Head of range list.

Definition at line 62 of file ranges-list.hpp.

## c

RangeList* Gecode::Iter::Ranges::RangeListIter::c

protected

Current list element.

Definition at line 64 of file ranges-list.hpp.

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

- gecode/iter/ranges-list.hpp