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

Value iterator for selecting only negative values. More...

#include <values-negative.hpp>

Protected Attributes

i
 Input iterator.
 

Constructors and initialization

 Negative (void)
 Default constructor.
 
 Negative (I &i)
 Initialize with values from i.
 
void init (I &i)
 Initialize with values from i.
 

Iteration control

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

Value access

int val (void) const
 Return current value.
 

Detailed Description

template<class I, bool strict = false>
class Gecode::Iter::Values::Negative< I, strict >

Value iterator for selecting only negative values.

If strict is true, zero is excluded.

Definition at line 43 of file values-negative.hpp.

Constructor & Destructor Documentation

◆ Negative() [1/2]

template<class I , bool strict>
Gecode::Iter::Values::Negative< I, strict >::Negative ( void )
inline

Default constructor.

Definition at line 76 of file values-negative.hpp.

◆ Negative() [2/2]

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

Initialize with values from i.

Definition at line 86 of file values-negative.hpp.

Member Function Documentation

◆ init()

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

Initialize with values from i.

Definition at line 80 of file values-negative.hpp.

◆ operator()()

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

Test whether iterator is still at a value or done.

Definition at line 95 of file values-negative.hpp.

◆ operator++()

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

Move iterator to next value (if possible)

Definition at line 90 of file values-negative.hpp.

◆ val()

template<class I , bool strict>
int Gecode::Iter::Values::Negative< I, strict >::val ( void ) const
inline

Return current value.

Definition at line 105 of file values-negative.hpp.

Member Data Documentation

◆ i

template<class I , bool strict = false>
I Gecode::Iter::Values::Negative< I, strict >::i
protected

Input iterator.

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


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