NO FRAMES

Class IloAnySetVarArray

Definition file: ilconcert/iloanyset.h
The array class of the set variable class IloAnySetVar.

For each basic type, Concert Technology defines a corresponding array class. IloAnySetVarArray is the array class of the set variable class for enumerated values (IloAnySetVar) in a model.

Instances of IloAnySetVarArray are extensible. That is, you can add more elements to such an array. References to an array change whenever an element is added or removed from the array.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

For more information on arrays, see the concept Arrays

See Also:

Constructor Summary
public IloAnySetVarArray(IloDefaultArrayI *)
public IloAnySetVarArray(const IloEnv, IloInt)
public IloAnySetVarArray(const IloEnv, IloInt, const IloAnySetVar, const IloAnySetVar v1...)
Method Summary
public voidadd(IloInt, const IloAnySetVar)
public voidadd(const IloAnySetVar)
public voidadd(const IloAnySetVarArray)
public IloAnySetVaroperator[](IloInt)
public IloAnySetVar &operator[](IloInt)
Inherited Methods from IloExtractableArray
add, add, add, endElements
Constructor Detail

IloAnySetVarArray

public IloAnySetVarArray(IloDefaultArrayI * i)

This constructor creates an empty extensible array of set variables, where each set is a set of enumerated values. You cannot create instances of the undocumented class IloDefaultArrayI. As a parameter in this default constructor, it allows you to pass 0 (zero) as a value to an optional parameter in functions and member functions that accept an array as a parameter.


IloAnySetVarArray

public IloAnySetVarArray(const IloEnv env, IloInt n)

This constructor creates an extensible array of n set variables, where each set is a set of enumerated values. Initially, the n elements are empty handles.


IloAnySetVarArray

public IloAnySetVarArray(const IloEnv env, IloInt n, const IloAnySetVar v0, const IloAnySetVar v1... )

This constructor creates an extensible array of n set variables, as indicated by v0, v1, etc.


Method Detail

add

public void add(IloInt more, const IloAnySetVar x)

This member function appends x to the invoking array multiple times. The parameter more indicates how many times.


add

public void add(const IloAnySetVar x)

This member function appends x to the invoking array.


add

public void add(const IloAnySetVarArray array)

This member function appends the elements in array to the invoking array.


operator[]

public IloAnySetVar operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position indicated by the index i. Concert Technology uses the const operator

IloAnySetVar operator[] (IloInt i) const;

on const arrays.


operator[]

public IloAnySetVar & operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position indicated by the index i.