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

Range iterator for range lists More...

`#include <ranges-rangelist.hpp>`

## Protected Attributes

const Gecode::RangeList * | c
| Current range.

## Constructors and initialization

| RangeList (void)
| Default constructor.
| RangeList (const Gecode::RangeList *s)
| Initialize with range list s.
void | init (const Gecode::RangeList *s)
| Initialize with range list s.

## 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).

## 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).

## Detailed Description

Range iterator for range lists

Allows to iterate the ranges of a RangeList where the ranges must be increasing and non-overlapping.

Definition at line 44 of file ranges-rangelist.hpp.

## Constructor & Destructor Documentation

## RangeList() [1/2]

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

inline

Default constructor.

Definition at line 80 of file ranges-rangelist.hpp.

## RangeList() [2/2]

Gecode::Iter::Ranges::RangeList::RangeList | ( | const Gecode::RangeList * | s | ) |

inline

Initialize with range list s.

Definition at line 83 of file ranges-rangelist.hpp.

## Member Function Documentation

## init()

void Gecode::Iter::Ranges::RangeList::init | ( | const Gecode::RangeList * | s | ) |

inline

Initialize with range list s.

Definition at line 86 of file ranges-rangelist.hpp.

## operator()()

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

inline

Test whether iterator is still at a range or done.

Definition at line 89 of file ranges-rangelist.hpp.

## operator++()

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

inline

Move iterator to next range (if possible).

Definition at line 92 of file ranges-rangelist.hpp.

## min()

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

inline

Return smallest value of range.

Definition at line 97 of file ranges-rangelist.hpp.

## max()

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

inline

Return largest value of range.

Definition at line 101 of file ranges-rangelist.hpp.

## width()

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

inline

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

Definition at line 105 of file ranges-rangelist.hpp.

## Member Data Documentation

## c

const Gecode::RangeList* Gecode::Iter::Ranges::RangeList::c

protected

Current range.

Definition at line 47 of file ranges-rangelist.hpp.

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

- gecode/iter/ranges-rangelist.hpp