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

Range iterator for intersection of iterators. More...

`#include <ranges-inter.hpp>`

## Protected Attributes

RangeList * | f
| Freelist.
Protected Attributes inherited from Gecode::Iter::Ranges::RangeListIter
RLIO * | rlio
| Reference to shared object.
RangeList * | h
| Head of range list.
RangeList * | c
| Current list element.

## Constructors and initialization

| NaryInter (void)
| Default constructor.
template<class I>
| NaryInter (Region &r, I &i)
| Initialize with single iterator i.
template<class I, class J>
| NaryInter (Region &r, I &i, J &j)
| Initialize with iterators i and j.
template<class I>
| NaryInter (Region &r, I *i, int n)
| Initialize with n iterators in i.
template<class I>
void | init (Region &r, I &i)
| Initialize with single iterator i.
template<class I, class J>
void | init (Region &r, I &i, J &j)
| Initialize with iterators i and j.
template<class I>
void | init (Region &r, I *i, int n)
| Initialize with n iterators in i.
template<class I>
void | operator&= (I &i)
| Add iterator i.
NaryInter & | operator= (const NaryInter &m)
| Assignment operator (both iterators must be allocated from the same region).

## Additional Inherited Members

| 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.
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.
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.
Protected Member Functions inherited from Gecode::Iter::Ranges::RangeListIter
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.

## Detailed Description

Range iterator for intersection of iterators.

Definition at line 74 of file ranges-inter.hpp.

## Constructor & Destructor Documentation

## NaryInter() [1/4]

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

inline

Default constructor.

Definition at line 160 of file ranges-inter.hpp.

## NaryInter() [2/4]

template<class I>

Gecode::Iter::Ranges::NaryInter::NaryInter | ( | Region & | r,
|  | I & | i )

inline

Initialize with single iterator i.

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

## NaryInter() [3/4]

template<class I, class J>

Gecode::Iter::Ranges::NaryInter::NaryInter | ( | Region & | r,
|  | I & | i,
|  | J & | j )

inline

Initialize with iterators i and j.

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

## NaryInter() [4/4]

template<class I>

Gecode::Iter::Ranges::NaryInter::NaryInter | ( | Region & | r,
|  | I * | i,
|  | int | n )

inline

Initialize with n iterators in i.

Definition at line 250 of file ranges-inter.hpp.

## Member Function Documentation

## init() [1/3]

template<class I>

void Gecode::Iter::Ranges::NaryInter::init | ( | Region & | r,
|  | I & | i )

inline

Initialize with single iterator i.

Definition at line 164 of file ranges-inter.hpp.

## init() [2/3]

template<class I, class J>

void Gecode::Iter::Ranges::NaryInter::init | ( | Region & | r,
|  | I & | i,
|  | J & | j )

inline

Initialize with iterators i and j.

Definition at line 172 of file ranges-inter.hpp.

## init() [3/3]

template<class I>

void Gecode::Iter::Ranges::NaryInter::init | ( | Region & | r,
|  | I * | i,
|  | int | n )

inline

Initialize with n iterators in i.

Definition at line 197 of file ranges-inter.hpp.

## operator&=()

template<class I>

void Gecode::Iter::Ranges::NaryInter::operator&= | ( | I & | i | ) |

inline

Add iterator i.

Definition at line 256 of file ranges-inter.hpp.

## operator=()

NaryInter & Gecode::Iter::Ranges::NaryInter::operator= | ( | const NaryInter & | m | ) |

inline

Assignment operator (both iterators must be allocated from the same region).

Definition at line 297 of file ranges-inter.hpp.

## Member Data Documentation

## f

RangeList* Gecode::Iter::Ranges::NaryInter::f

protected

Freelist.

Definition at line 77 of file ranges-inter.hpp.

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

- gecode/iter/ranges-inter.hpp