Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0

Integer variable array. More...

#include <int.hh>

Creation and initialization

 IntVarArray (void)
 Default constructor (array of size 0)
 IntVarArray (Space &home, int n)
 Allocate array for n integer variables (variables are uninitialized)
 IntVarArray (const IntVarArray &a)
 Initialize from integer variable array a (share elements)
 IntVarArray (Space &home, const IntVarArgs &a)
 Initialize from integer variable argument array a (copy elements)
 IntVarArray (Space &home, int n, int min, int max)
 Initialize array with n new variables.
 IntVarArray (Space &home, int n, const IntSet &s)
 Initialize array with n new variables.
IntVarArrayoperator= (const IntVarArray &)=default
 Assignment operator.

Additional Inherited Members

typedef IntVar value_type
 Type of the variable stored in this array.
typedef IntVarreference
 Type of a reference to the value type.
typedef const IntVarconst_reference
 Type of a constant reference to the value type.
typedef IntVarpointer
 Type of a pointer to the value type.
typedef const IntVarconst_pointer
 Type of a read-only pointer to the value type.
typedef IntVariterator
 Type of the iterator used to iterate through this array's elements.
typedef const IntVarconst_iterator
 Type of the iterator used to iterate read-only through this array's elements.
typedef std::reverse_iterator< IntVar * > reverse_iterator
 Type of the iterator used to iterate backwards through this array's elements.
typedef std::reverse_iterator< const IntVar * > const_reverse_iterator
 Type of the iterator used to iterate backwards and read-only through this array's elements.
 VarArray (void)
 Default constructor (array of size 0)
const VarArray< IntVar > & operator= (const VarArray< IntVar > &a)
 Initialize from variable array a (share elements)
int size (void) const
 Return size of array (number of elements)
IntVaroperator[] (int i)
 Return variable at position i.
ArrayTraits< VarArgArray< IntVar > >::ArgsType slice (int start, int inc=1, int n=-1)
iterator begin (void)
 Return an iterator at the beginning of the array.
iterator end (void)
 Return an iterator past the end of the array.
reverse_iterator rbegin (void)
 Return a reverse iterator at the end of the array.
reverse_iterator rend (void)
 Return a reverse iterator past the beginning of the array.
bool assigned (void) const
 Test if all variables are assigned.
void update (Space &home, VarArray< IntVar > &a)
 Update array to be a clone of array a.
Protected Attributes inherited from Gecode::VarArray< IntVar >
int n
 Number of variables (size)
IntVarx
 Array of variables.

Detailed Description

Integer variable array.

Definition at line 772 of file int.hh.

Constructor & Destructor Documentation

◆ IntVarArray() [1/6]

Gecode::IntVarArray::IntVarArray ( void )
inline

Default constructor (array of size 0)

Definition at line 143 of file array.hpp.

◆ IntVarArray() [2/6]

Gecode::IntVarArray::IntVarArray ( Space & home,
int n )
inline

Allocate array for n integer variables (variables are uninitialized)

Definition at line 146 of file array.hpp.

◆ IntVarArray() [3/6]

Gecode::IntVarArray::IntVarArray ( const IntVarArray & a)
inline

Initialize from integer variable array a (share elements)

Definition at line 150 of file array.hpp.

◆ IntVarArray() [4/6]

Gecode::IntVarArray::IntVarArray ( Space & home,
const IntVarArgs & a )
inline

Initialize from integer variable argument array a (copy elements)

Definition at line 154 of file array.hpp.

◆ IntVarArray() [5/6]

Gecode::IntVarArray::IntVarArray ( Space & home,
int n,
int min,
int max )

Initialize array with n new variables.

The variables are created with a domain ranging from min to max. The following execptions might be thrown:

Definition at line 38 of file array.cpp.

◆ IntVarArray() [6/6]

Gecode::IntVarArray::IntVarArray ( Space & home,
int n,
const IntSet & s )

Initialize array with n new variables.

The variables are created with a domain described by s. The following execptions might be thrown:

Definition at line 48 of file array.cpp.

Member Function Documentation

◆ operator=()

IntVarArray & Gecode::IntVarArray::operator= ( const IntVarArray & )
default

Assignment operator.


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