Gecode::SetVarArgs Class Reference

Passing set variables. More...

`#include <set.hh>`

## Constructors and initialization

| SetVarArgs (void)
| Allocate empty array.
| SetVarArgs (int n)
| Allocate array with n elements.
| SetVarArgs (const SetVarArgs &a)
| Initialize from variable argument array a (copy elements).
| SetVarArgs (const VarArray< SetVar > &a)
| Initialize from variable array a (copy elements).
| SetVarArgs (const std::vector< SetVar > &a)
| Initialize from vector a.
| SetVarArgs (std::initializer_list< SetVar > a)
| Initialize from list a.
template<class InputIterator>
| SetVarArgs (InputIterator first, InputIterator last)
| Initialize from InputIterator first and last.
| SetVarArgs (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.
| SetVarArgs (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.
| SetVarArgs (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.
| SetVarArgs (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 view 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.
| VarArgArray (void)
| Allocate empty array.
ArrayTraits< VarArgArray< SetVar > >::ArgsType | slice (int start, int inc=1, int n=-1)
| Return slice of length n such that forall , .
ArrayTraits< VarArgArray< SetVar > >::ArgsType & | operator<< (const SetVar &x)
| Insert a new element x at the end of the array (increase size by 1).
bool | assigned (void) const
| Test if all variables are assigned.
| ArgArrayBase (void)
| Allocate empty array.
const ArgArrayBase< SetVar > & | operator= (const ArgArrayBase< SetVar > &a)
| Initialize from view array a (copy elements).
int | size (void) const
| Return size of array (number of elements).
SetVar & | operator[] (int i)
| Return element at position i.
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.
| ~ArgArrayBase (void)
| Destructor.
Protected Member Functions inherited from Gecode::ArgArrayBase< SetVar >
SetVar * | allocate (int n)
| Allocate memory for n elements.
void | resize (int i)
| Resize to hold at least i additional elements.
A | concat (const ArgArrayBase< SetVar > &x) const
| Return this array concatenated with x.
A & | append (const SetVar &x)
| Insert a new element x at the end of the array (increase size by 1).
A | slice (int start, int inc=1, int n=-1)
Protected Attributes inherited from Gecode::ArgArrayBase< SetVar >
int | n
| Number of elements.
int | capacity
| Allocated size of the array.
SetVar * | a
| Element array.
SetVar | onstack [onstack_size]
| In-array storage for elements.
Static Protected Attributes inherited from Gecode::ArgArrayBase< SetVar >
static const int | onstack_size
| How many elements are possible inside array.
Related Symbols inherited from Gecode::VarArgArray< SetVar >
bool | same (VarArgArray< SetVar > x, VarArgArray< SetVar > y)
| Test whether array x together with array y contains at least one variable being the same.
bool | same (VarArgArray< SetVar > x, SetVar y)
| Test whether array x contains variable y.
bool | same (SetVar x, VarArgArray< SetVar > y)
| Test whether array y contains variable x.
bool | same (VarArgArray< SetVar > x)
| Test whether array x contains a variable multiply.
Related Symbols inherited from Gecode::ArgArrayBase< SetVar >
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const ArgArrayBase< SetVar > &x)
| Print array elements enclosed in curly brackets.

## Detailed Description

Passing set variables.

We could have used a simple typedef instead, but doxygen cannot resolve some overloading then, leading to unusable documentation for important parts of the library. As long as there is no fix for this, we will keep this workaround.

Definition at line 488 of file set.hh.

## Constructor & Destructor Documentation

## SetVarArgs() [1/11]

Gecode::SetVarArgs::SetVarArgs | ( | void |  | ) |

inline

Allocate empty array.

Definition at line 48 of file array.hpp.

## SetVarArgs() [2/11]

Gecode::SetVarArgs::SetVarArgs | ( | int | n | ) |

inline explicit

Allocate array with n elements.

Definition at line 51 of file array.hpp.

## SetVarArgs() [3/11]

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

inline

Initialize from variable argument array a (copy elements).

Definition at line 55 of file array.hpp.

## SetVarArgs() [4/11]

Gecode::SetVarArgs::SetVarArgs | ( | const VarArray< SetVar > & | a | ) |

inline

Initialize from variable array a (copy elements).

Definition at line 59 of file array.hpp.

## SetVarArgs() [5/11]

Gecode::SetVarArgs::SetVarArgs | ( | const std::vector< SetVar > & | a | ) |

inline

Initialize from vector a.

Definition at line 63 of file array.hpp.

## SetVarArgs() [6/11]

Gecode::SetVarArgs::SetVarArgs | ( | std::initializer_list< SetVar > | a | ) |

inline

Initialize from list a.

Definition at line 67 of file array.hpp.

## SetVarArgs() [7/11]

template<class InputIterator>

Gecode::SetVarArgs::SetVarArgs | ( | InputIterator | first,
|  | InputIterator | last )

inline

Initialize from InputIterator first and last.

Definition at line 72 of file array.hpp.

## SetVarArgs() [8/11]

Gecode::SetVarArgs::SetVarArgs | ( | 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 131 of file array.cpp.

## SetVarArgs() [9/11]

Gecode::SetVarArgs::SetVarArgs | ( | 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 152 of file array.cpp.

## SetVarArgs() [10/11]

Gecode::SetVarArgs::SetVarArgs | ( | 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 171 of file array.cpp.

## SetVarArgs() [11/11]

Gecode::SetVarArgs::SetVarArgs | ( | 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 192 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