Gecode::SetVarArray Class Reference
Functionality by programming task » Programming models » Using integer set variables and constraints » Variable arrays

Set variable array More...

`#include <set.hh>`

## Creation and initialization

| SetVarArray (void)
| Default constructor (array of size 0).
| SetVarArray (const SetVarArray &)
| Initialize from set variable array a (share elements).
| SetVarArray (Space &home, const SetVarArgs &)
| Initialize from set variable argument array a (copy elements).
| SetVarArray (Space &home, int n)
| Allocate array for n set variables (variables are uninitialized).
| SetVarArray (Space &home, int n, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
| Create an array of size n.
| SetVarArray (Space &home, int n, const IntSet &glb, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
| Create an array of size n.
| SetVarArray (Space &home, int n, int glbMin, int glbMax, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
| Create an array of size n.
| SetVarArray (Space &home, int n, const IntSet &glb, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
| Create an array of size n.

## Additional Inherited Members

typedef SetVar | value_type
| Type of the variable stored in this array.
typedef SetVar & | reference
| Type of a reference to the value type.
typedef const SetVar & | const_reference
| Type of a constant reference to the value type.
typedef SetVar * | pointer
| Type of a pointer to the value type.
typedef const SetVar * | const_pointer
| Type of a read-only pointer to the value type.
typedef SetVar * | iterator
| Type of the iterator used to iterate through this array's elements.
typedef const SetVar * | const_iterator
| Type of the iterator used to iterate read-only through this array's elements.
typedef std::reverse_iterator< SetVar * > | reverse_iterator
| Type of the iterator used to iterate backwards through this array's elements.
typedef std::reverse_iterator< const SetVar * > | 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< SetVar > & | operator= (const VarArray< SetVar > &a)
| Initialize from variable array a (share elements).
int | size (void) const
| Return size of array (number of elements).
SetVar & | operator[] (int i)
| Return variable at position i.
ArrayTraits< VarArgArray< SetVar > >::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< SetVar > &a)
| Update array to be a clone of array a.
Protected Attributes inherited from Gecode::VarArray< SetVar >
int | n
| Number of variables (size).
SetVar * | x
| Array of variables.
Related Symbols inherited from Gecode::VarArray< SetVar >
ArrayTraits< VarArray< T > >::ArgsType | operator+ (const VarArray< T > &x, const VarArgArray< T > &y)
ArrayTraits< VarArray< T > >::ArgsType | operator+ (const VarArray< T > &x, const VarArray< T > &y)
ArrayTraits< VarArray< T > >::ArgsType | operator+ (const VarArgArray< T > &x, const VarArray< T > &y)
ArrayTraits< VarArray< T > >::ArgsType | operator+ (const VarArray< T > &x, const T &y)
ArrayTraits< VarArray< T > >::ArgsType | operator+ (const T &x, const VarArray< T > &y)
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const VarArray< SetVar > &x)
| Print array elements enclosed in curly brackets.

## Detailed Description

Set variable array

Definition at line 570 of file set.hh.

## Constructor & Destructor Documentation

## SetVarArray() [1/8]

Gecode::SetVarArray::SetVarArray | ( | void |  | ) |

inline

Default constructor (array of size 0).

Definition at line 77 of file array.hpp.

## SetVarArray() [2/8]

Gecode::SetVarArray::SetVarArray | ( | const SetVarArray & | a | ) |

inline

Initialize from set variable array a (share elements).

Definition at line 80 of file array.hpp.

## SetVarArray() [3/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | const SetVarArgs & | a )

inline

Initialize from set variable argument array a (copy elements).

Definition at line 84 of file array.hpp.

## SetVarArray() [4/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | int | n )

Allocate array for n set variables (variables are uninitialized).

Definition at line 44 of file array.cpp.

## SetVarArray() [5/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | int | n,
|  | int | glbMin,
|  | int | glbMax,
|  | int | lubMin,
|  | int | lubMax,
|  | unsigned int | minCard = 0,
|  | unsigned int | maxCard = Set::Limits::card )

Create an array of size n.

Each variable is initialized with the bounds and cardinality as given by the arguments.

Definition at line 50 of file array.cpp.

## SetVarArray() [6/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | int | n,
|  | const IntSet & | glb,
|  | int | lubMin,
|  | int | lubMax,
|  | unsigned int | minCard = 0,
|  | unsigned int | maxCard = Set::Limits::card )

Create an array of size n.

Each variable is initialized with the bounds and cardinality as given by the arguments.

Definition at line 71 of file array.cpp.

## SetVarArray() [7/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | int | n,
|  | int | glbMin,
|  | int | glbMax,
|  | const IntSet & | lub,
|  | unsigned int | minCard = 0,
|  | unsigned int | maxCard = Set::Limits::card )

Create an array of size n.

Each variable is initialized with the bounds and cardinality as given by the arguments.

Definition at line 90 of file array.cpp.

## SetVarArray() [8/8]

Gecode::SetVarArray::SetVarArray | ( | Space & | home,
|  | int | n,
|  | const IntSet & | glb,
|  | const IntSet & | lub,
|  | unsigned int | minCard = 0,
|  | unsigned int | maxCard = Set::Limits::card )

Create an array of size n.

Each variable is initialized with the bounds and cardinality as given by the arguments.

Definition at line 111 of file array.cpp.

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

- gecode/set.hh
- gecode/set/array.cpp
- gecode/set/array.hpp