Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::Iter::Ranges::Positive< I, strict > Class Template Reference

Range iterator for positive part of a range iterator. More...

#include <ranges-positive.hpp>

Protected Attributes

i
 Input iterator.

Constructors and initialization

 Positive (void)
 Default constructor.
 Positive (I &i)
 Initialize with ranges from i.
void init (I &i)
 Initialize with ranges from i.

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 I, bool strict = false>
class Gecode::Iter::Ranges::Positive< I, strict >

Range iterator for positive part of a range iterator.

If strict is true, zero is excluded.

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

Constructor & Destructor Documentation

◆ Positive() [1/2]

template<class I, bool strict>
Gecode::Iter::Ranges::Positive< I, strict >::Positive ( void )
inline

Default constructor.

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

◆ Positive() [2/2]

template<class I, bool strict>
Gecode::Iter::Ranges::Positive< I, strict >::Positive ( I & i)
inline

Initialize with ranges from i.

Definition at line 98 of file ranges-positive.hpp.

Member Function Documentation

◆ init()

template<class I, bool strict>
void Gecode::Iter::Ranges::Positive< I, strict >::init ( I & i)
inline

Initialize with ranges from i.

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

◆ operator()()

template<class I, bool strict>
bool Gecode::Iter::Ranges::Positive< I, strict >::operator() ( void ) const
inline

Test whether iterator is still at a range or done.

Definition at line 109 of file ranges-positive.hpp.

◆ operator++()

template<class I, bool strict>
void Gecode::Iter::Ranges::Positive< I, strict >::operator++ ( void )
inline

Move iterator to next range (if possible)

Definition at line 104 of file ranges-positive.hpp.

◆ min()

template<class I, bool strict>
int Gecode::Iter::Ranges::Positive< I, strict >::min ( void ) const
inline

Return smallest value of range.

Definition at line 115 of file ranges-positive.hpp.

◆ max()

template<class I, bool strict>
int Gecode::Iter::Ranges::Positive< I, strict >::max ( void ) const
inline

Return largest value of range.

Definition at line 124 of file ranges-positive.hpp.

◆ width()

template<class I, bool strict>
unsigned int Gecode::Iter::Ranges::Positive< I, strict >::width ( void ) const
inline

Return width of range (distance between minimum and maximum)

Definition at line 129 of file ranges-positive.hpp.

Member Data Documentation

◆ i

template<class I, bool strict = false>
I Gecode::Iter::Ranges::Positive< I, strict >::i
protected

Input iterator.

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


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