Generated on Thu Apr 11 14:00:06 2019 for Gecode by doxygen 1.6.3

Gecode::Iter::Values::Array Class Reference
[Value iterators]

Value iterator for array of integers More...

#include <values-array.hpp>

List of all members.

Protected Attributes

int * v
 Array for values.
unsigned int c
 Current value.
unsigned int n
 Number of values in array.

Constructors and initialization



 Array (void)
 Default constructor.
 Array (int *v, unsigned int n)
 Initialize with n values from v.
 Array (int *v, int n)
 Initialize with n values from v.
void init (int *v, unsigned int n)
 Initialize with n ranges from v.
void init (int *v, int n)
 Initialize with n ranges from v.

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).
void reset (void)
 Reset iterator to start from beginning.

Value access



int val (void) const
 Return current value.

Detailed Description

Value iterator for array of integers

Allows to iterate the integers as defined by an array where the values in the array must be sorted in increasing order. The integers can be iterated several times provided the iterator is reset by the reset member function.

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


Constructor & Destructor Documentation

Gecode::Iter::Values::Array::Array ( void   )  [inline]

Default constructor.

Definition at line 88 of file values-array.hpp.

Gecode::Iter::Values::Array::Array ( int *  v,
unsigned int  n 
) [inline]

Initialize with n values from v.

Definition at line 91 of file values-array.hpp.

Gecode::Iter::Values::Array::Array ( int *  v,
int  n 
) [inline]

Initialize with n values from v.

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


Member Function Documentation

void Gecode::Iter::Values::Array::init ( int *  v,
unsigned int  n 
) [inline]

Initialize with n ranges from v.

Definition at line 99 of file values-array.hpp.

void Gecode::Iter::Values::Array::init ( int *  v,
int  n 
) [inline]

Initialize with n ranges from v.

Definition at line 104 of file values-array.hpp.

bool Gecode::Iter::Values::Array::operator() ( void   )  const [inline]

Test whether iterator is still at a value or done.

Definition at line 113 of file values-array.hpp.

void Gecode::Iter::Values::Array::operator++ ( void   )  [inline]

Move iterator to next value (if possible).

Definition at line 109 of file values-array.hpp.

void Gecode::Iter::Values::Array::reset ( void   )  [inline]

Reset iterator to start from beginning.

Definition at line 117 of file values-array.hpp.

int Gecode::Iter::Values::Array::val ( void   )  const [inline]

Return current value.

Definition at line 122 of file values-array.hpp.


Member Data Documentation

Array for values.

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

unsigned int Gecode::Iter::Values::Array::c [protected]

Current value.

Definition at line 51 of file values-array.hpp.

unsigned int Gecode::Iter::Values::Array::n [protected]

Number of values in array.

Definition at line 53 of file values-array.hpp.


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