Gecode::Iter::Values::Unique< I > Class Template Reference
Common functionality » Range and value iterators » Value iterators

Remove duplicate values from from value iterator. More...

`#include <values-unique.hpp>`

## Protected Attributes

I | i
| Value iterator used.

## Constructors and initialization

| Unique (void)
| Default constructor.
| Unique (I &i)
| Initialize with value iterator i.
void | init (I &i)
| Initialize with value iterator i.

## Iteration control

bool | operator() (void) const
| Test whether iterator is still at a value or done.
void | operator++ (void)
| Move iterator to next unique value (if possible).

## Value access

int | val (void) const
| Return current value.

## Detailed Description

template<class I>
class Gecode::Iter::Values::Unique< I >

Remove duplicate values from from value iterator.

The iterator only requires that the value iterator iterates values in increasing order. Duplicates in the iterated value sequence are removed.

Definition at line 46 of file values-unique.hpp.

## Constructor & Destructor Documentation

## Unique() [1/2]

template<class I>

Gecode::Iter::Values::Unique< I >::Unique | ( | void |  | ) |

inline

Default constructor.

Definition at line 78 of file values-unique.hpp.

## Unique() [2/2]

template<class I>

Gecode::Iter::Values::Unique< I >::Unique | ( | I & | i | ) |

inline

Initialize with value iterator i.

Definition at line 82 of file values-unique.hpp.

## Member Function Documentation

## init()

template<class I>

void Gecode::Iter::Values::Unique< I >::init | ( | I & | i | ) |

inline

Initialize with value iterator i.

Definition at line 87 of file values-unique.hpp.

## operator()()

template<class I>

bool Gecode::Iter::Values::Unique< I >::operator() | ( | void |  | ) | const

inline

Test whether iterator is still at a value or done.

Definition at line 101 of file values-unique.hpp.

## operator++()

template<class I>

void Gecode::Iter::Values::Unique< I >::operator++ | ( | void |  | ) |

inline

Move iterator to next unique value (if possible).

Definition at line 93 of file values-unique.hpp.

## val()

template<class I>

int Gecode::Iter::Values::Unique< I >::val | ( | void |  | ) | const

inline

Return current value.

Definition at line 107 of file values-unique.hpp.

## Member Data Documentation

## i

template<class I>

I Gecode::Iter::Values::Unique< I >::i

protected

Value iterator used.

Definition at line 49 of file values-unique.hpp.

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

- gecode/iter/values-unique.hpp