Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::Iter::Values::ToRanges< I > Class Template Reference

Range iterator from value iterator. More...

#include <values-ranges.hpp>

Protected Attributes

i
 Value iterator used.
 
- Protected Attributes inherited from Gecode::Iter::Ranges::MinMax
int mi
 Minimum of current range.
 
int ma
 Maximum of current range.
 

Constructors and initialization

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

Iteration control

void operator++ (void)
 Move iterator to next range (if possible)
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::Iter::Ranges::MinMax
 MinMax (void)
 Default constructor.
 
 MinMax (int min, int max)
 Initialize with range min to max.
 
bool operator() (void) const
 Test whether iterator is still at a range or done.
 
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)
 
- Protected Member Functions inherited from Gecode::Iter::Ranges::MinMax
void finish (void)
 Set range such that iteration stops
 

Detailed Description

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

Range iterator from value iterator.

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

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

Constructor & Destructor Documentation

◆ ToRanges() [1/2]

template<class I >
Gecode::Iter::Values::ToRanges< I >::ToRanges ( void )
inline

Default constructor.

Definition at line 70 of file values-ranges.hpp.

◆ ToRanges() [2/2]

template<class I >
Gecode::Iter::Values::ToRanges< I >::ToRanges ( I & i)
inline

Initialize with value iterator i.

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

Member Function Documentation

◆ init()

template<class I >
void Gecode::Iter::Values::ToRanges< I >::init ( I & i)
inline

Initialize with value iterator i.

Definition at line 94 of file values-ranges.hpp.

◆ operator++()

template<class I >
void Gecode::Iter::Values::ToRanges< I >::operator++ ( void )
inline

Move iterator to next range (if possible)

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

Member Data Documentation

◆ i

template<class I >
I Gecode::Iter::Values::ToRanges< I >::i
protected

Value iterator used.

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


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