FRAMES NO FRAMES

Class IlcIntSetVarArray

Definition file: ilsolver/intset.h
Include file: <ilsolver/ilosolver.h>

An array of constrained set variables of integers is an instance of the class IlcIntSetVarArray. The elements of such an array are instances of IlcIntSetVar.

Empty Handle or Null Array

It is possible to create a null array, or in other words, an empty handle. When you do so, only these operations are allowed on that null array:

Attempts to access a null array in any other way will throw an exception (an instance of IloSolver::SolverErrorException).

See Also:

Constructor Summary
public IlcIntSetVarArray()
public IlcIntSetVarArray(IlcIntSetVarArrayI * impl)
public IlcIntSetVarArray(IloSolver solver, IlcInt size)
public IlcIntSetVarArray(IloSolver solver, IlcInt size, IlcInt min, IlcInt max)
public IlcIntSetVarArray(IloSolver s, IlcInt size, IlcIntArray array)
public IlcIntSetVarArray(IloSolver solver, IlcInt size ILCPARAM, const IlcIntSetVar v1, const IlcIntSetVar v2)
Method Summary
public IlcIntSetVarArraygetCopy(IloSolver solver) const
public IlcIntSetVarArrayI *getImpl() const
public const char *getName() const
public IloSolvergetSolver() const
public IloSolverI *getSolverI() const
public voidoperator=(const IlcIntSetVarArray & h)
public IlcIntSetVar &operator[](IlcInt index) const
public voidsetName(const char * name) const
Constructor Detail

IlcIntSetVarArray

public IlcIntSetVarArray()
This constructor creates an empty handle. You must initialize it before you use it.

IlcIntSetVarArray

public IlcIntSetVarArray(IlcIntSetVarArrayI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IlcIntSetVarArray

public IlcIntSetVarArray(IloSolver solver, IlcInt size)

This constructor creates an array of size uninitialized constrained set variables. The argument size must be strictly greater than 0 (zero). The index range of the array is [0 size), where 0 is included but size is excluded. Each element of the array must be assigned a value before the array can be used.


IlcIntSetVarArray

public IlcIntSetVarArray(IloSolver solver, IlcInt size, IlcInt min, IlcInt max)

This constructor creates an array of size constrained set variables. The index range of the array is [0 size) where 0 is included, but size is excluded. The argument size must be strictly greater than 0 (zero). None of the constrained variables has any required elements; for each of the constrained variables, the possible elements range from min to max, included.


IlcIntSetVarArray

public IlcIntSetVarArray(IloSolver s, IlcInt size, IlcIntArray array)

This constructor creates an array of size constrained set variables. The argument size must be strictly greater than 0 (zero). The index range of the array is [0 size), where 0 is included but size is excluded. Each constrained variable has no required elements; its possible elements are the pointers in array, an array of pointers.


IlcIntSetVarArray

public IlcIntSetVarArray(IloSolver solver, IlcInt size ILCPARAM, const IlcIntSetVar v1, const IlcIntSetVar v2)

This constructor creates an array of size elements. The elements must be successive. If size is different from the number of instances of IlcIntSetVar passed to the constructor, then the behavior of this constructor is undefined and unlikely to be what you want. The argument size must be strictly greater than 0 (zero).


Method Detail

getCopy

public IlcIntSetVarArray getCopy(IloSolver solver) const

This member function returns a copy of the invoking array of constrained set variables and associates that copy with solver.


getImpl

public IlcIntSetVarArrayI * getImpl() const
This constructor creates an object by copying another one. This member function returns a pointer to the implementation object of the invoking handle.

getName

public const char * getName() const
This member function returns the name of the invoking object.

getSolver

public IloSolver getSolver() const

This member function returns an instance of IloSolver associated with the invoking object.


getSolverI

public IloSolverI * getSolverI() const

This member function returns a pointer to the implementation object of the solver where the invoking object was extracted.


operator=

public void operator=(const IlcIntSetVarArray & h)
This operator assigns an address to the handle pointer of the invoking object. That address is the location of the implementation object of the provided argument.

operator[]

public IlcIntSetVar & operator[](IlcInt index) const

This subscripting operator returns a reference to the variable at rank index in the invoking array. The fact the operator returns a reference makes it possible for you, as a developer, to assign the corresponding constrained expression.


setName

public void setName(const char * name) const
This member function sets the name of the invoking object to a copy of name. This assignment is a reversible action.