Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.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.
 

Additional Inherited Members

- Public Types inherited from Gecode::VarArray< IntVar >
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.
 
- Public Member Functions inherited from Gecode::VarArray< IntVar >
 VarArray (void)
 Default constructor (array of size 0)
 
 VarArray (Space &home, int m)
 Allocate array with m variables.
 
 VarArray (Space &home, const VarArgArray< IntVar > &)
 Initialize from variable argument array a (copy elements)
 
 VarArray (const VarArray< IntVar > &a)
 Initialize from variable array a (share elements)
 
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.
 
const IntVaroperator[] (int i) const
 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.
 
const_iterator begin (void) const
 Return a read-only iterator at the beginning of the array.
 
iterator end (void)
 Return an iterator past the end of the array.
 
const_iterator end (void) const
 Return a read-only iterator past the end of the array.
 
reverse_iterator rbegin (void)
 Return a reverse iterator at the end of the array.
 
const_reverse_iterator rbegin (void) const
 Return a reverse and read-only iterator at the end of the array.
 
reverse_iterator rend (void)
 Return a reverse iterator past the beginning of the array.
 
const_reverse_iterator rend (void) const
 Return a reverse and read-only 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 763 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.


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