Gecode::Int::ViewRanges< View > Class Template Reference
Functionality by programming task » Programming actors » Programming integer actors

Range iterator for integer views. More...

`#include <view.hpp>`

## Constructors and initialization

| ViewRanges (void)
| Default constructor.
| ViewRanges (const View &x)
| Initialize with ranges for view x.
void | init (const View &x)
| Initialize with ranges for view x.

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

template<class View>
class Gecode::Int::ViewRanges< View >

Range iterator for integer views.

This class provides (by specialization) a range iterator for all integer views.

Note that this template class serves only as a specification of the interface of the various specializations.

Definition at line 54 of file view.hpp.

## Constructor & Destructor Documentation

## ViewRanges() [1/2]

template<class View>

Gecode::Int::ViewRanges< View >::ViewRanges | ( | void |  | ) |

Default constructor.

## ViewRanges() [2/2]

template<class View>

Gecode::Int::ViewRanges< View >::ViewRanges | ( | const View & | x | ) |

Initialize with ranges for view x.

## Member Function Documentation

## init()

template<class View>

void Gecode::Int::ViewRanges< View >::init | ( | const View & | x | ) |

Initialize with ranges for view x.

## operator()()

template<class View>

bool Gecode::Int::ViewRanges< View >::operator() | ( | void |  | ) | const

Test whether iterator is still at a range or done.

## operator++()

template<class View>

void Gecode::Int::ViewRanges< View >::operator++ | ( | void |  | ) |

Move iterator to next range (if possible).

## min()

template<class View>

int Gecode::Int::ViewRanges< View >::min | ( | void |  | ) | const

Return smallest value of range.

## max()

template<class View>

int Gecode::Int::ViewRanges< View >::max | ( | void |  | ) | const

Return largest value of range.

## width()

template<class View>

unsigned int Gecode::Int::ViewRanges< View >::width | ( | void |  | ) | const

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

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

- gecode/int/view.hpp