FRAMES NO FRAMES

Class IlcAnySetVarArray

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

An array of constrained set variables of pointers is an instance of the class IlcAnySetVarArray. The elements of such an array are instances of IlcAnySetVar.

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 IlcAnySetVarArray()
public IlcAnySetVarArray(IlcIntSetVarArrayI * impl)
public IlcAnySetVarArray(IloSolver solver, IlcInt size)
public IlcAnySetVarArray(IloSolver s, IlcInt size, IlcAnyArray array)
public IlcAnySetVarArray(IloSolver solver, IlcInt size ILCPARAM, const IlcAnySetVar v1, const IlcAnySetVar v2)
Method Summary
public IlcAnySetVarArraygetCopy(IloSolver solver) const
public IlcIntSetVarArrayI *getImpl() const
public const char *getName() const
public IloSolvergetSolver() const
public IloSolverI *getSolverI() const
public voidoperator=(const IlcAnySetVarArray & h)
public IlcAnySetVar &operator[](IlcInt index) const
public voidsetName(const char * name) const
Constructor Detail

IlcAnySetVarArray

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

IlcAnySetVarArray

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

IlcAnySetVarArray

public IlcAnySetVarArray(IloSolver solver, IlcInt size)

This constructor creates an array of size uninitialized 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). Each element of the array must be assigned a value before the array can be used.


IlcAnySetVarArray

public IlcAnySetVarArray(IloSolver s, IlcInt size, IlcAnyArray array)

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). Each constrained variable has no required elements; its possible elements are the pointers in array, an array of pointers.


IlcAnySetVarArray

public IlcAnySetVarArray(IloSolver solver, IlcInt size ILCPARAM, const IlcAnySetVar v1, const IlcAnySetVar v2)

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


Method Detail

getCopy

public IlcAnySetVarArray getCopy(IloSolver solver) const

This member function returns a copy of the invoking array of constrained set variables and associates that copy with the solver indicated by 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 IlcAnySetVarArray & 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 IlcAnySetVar & operator[](IlcInt index) const

This operator returns a reference to the element at rank i. This operator can be used for accessing (that is, simply reading) the element or for modifying (that is, writing) it.


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.