Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::Iter::Ranges::Minus Class Reference

Range iterator for pointwise minus of a range iterator. More...

#include <ranges-minus.hpp>

Constructors and initialization

 Minus (void)
 Default constructor.
 
 Minus (const Minus &m)
 Copy constructor.
 
template<class I >
 Minus (Region &r, I &i)
 Initialize with ranges from i.
 
template<class I >
void init (Region &r, I &i)
 Initialize with ranges from i.
 
Minusoperator= (const Minus &m)
 Assignment operator (both iterators must be allocated from the same region)
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::Iter::Ranges::RangeListIter
 RangeListIter (void)
 Default constructor.
 
 RangeListIter (const RangeListIter &i)
 Copy constructor.
 
 RangeListIter (Region &r)
 Initialize.
 
void init (Region &r)
 Initialize.
 
RangeListIteroperator= (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.
 
RangeListget (void) const
 Get head of current range list.
 
RangeListrange (int min, int max, RangeList *&f)
 Create new range possibly from freelist f and init.
 
RangeListrange (int min, int max)
 Create new range possibly and init.
 
template<class I >
RangeListrange (I &i, RangeList *&f)
 Create new range possibly from freelist f and init.
 
template<class I >
RangeListrange (I &i)
 Create new range possibly and init.
 
template<class I >
RangeListcopy (I &i)
 Copy the iterator i to a range list.
 
- Protected Attributes inherited from Gecode::Iter::Ranges::RangeListIter
RLIOrlio
 Reference to shared object.
 
RangeListh
 Head of range list.
 
RangeListc
 Current list element.
 

Detailed Description

Range iterator for pointwise minus of a range iterator.

This iterator in effect changes the order of how ranges are iterated: the first range of the input iterator defines the last range of the Minus iterator. Upon initialization all ranges of the input iterator are stored which later allows iteration in inverse direction.

Definition at line 47 of file ranges-minus.hpp.

Constructor & Destructor Documentation

◆ Minus() [1/3]

Gecode::Iter::Ranges::Minus::Minus ( void )
inline

Default constructor.

Definition at line 68 of file ranges-minus.hpp.

◆ Minus() [2/3]

Gecode::Iter::Ranges::Minus::Minus ( const Minus & m)
inline

Copy constructor.

Definition at line 71 of file ranges-minus.hpp.

◆ Minus() [3/3]

template<class I >
Gecode::Iter::Ranges::Minus::Minus ( Region & r,
I & i )
inline

Initialize with ranges from i.

Definition at line 91 of file ranges-minus.hpp.

Member Function Documentation

◆ init()

template<class I >
void Gecode::Iter::Ranges::Minus::init ( Region & r,
I & i )

Initialize with ranges from i.

Definition at line 76 of file ranges-minus.hpp.

◆ operator=()

Minus & Gecode::Iter::Ranges::Minus::operator= ( const Minus & m)
inline

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

Definition at line 96 of file ranges-minus.hpp.


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