FRAMES NO FRAMES

Class IlcAnySetArray

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

An instance of IlcAnySetArray represents an array of sets, instances of IlcAnySet. Its implementation class is the undocumented class IlcIntSetArrayI.

For each basic type, Solver defines a corresponding array class. This array class is a handle class. In other words, an object of this class contains a pointer to another object allocated on the Solver heap. Exploiting handles in this way greatly simplifies the programming interface since the handle can then be an automatic object: as a developer using handles, you do not have to worry about memory allocation.

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 IlcAnySetArray()
public IlcAnySetArray(IlcIntSetArrayI * impl)
public IlcAnySetArray(IloSolver solver, IlcInt size, IlcAnySet * values)
public IlcAnySetArray(IloSolver solver, IlcInt size, IlcAnyArray array)
public IlcAnySetArray(IloSolver solver, IlcInt size, const IlcAnySet exp...)
Method Summary
public IlcIntSetArrayI *getImpl() const
public const char *getName() const
public IlcIntgetSize() const
public IloSolvergetSolver() const
public IloSolverI *getSolverI() const
public voidoperator=(const IlcAnySetArray & h)
public IlcAnySet &operator[](IlcInt i) const
public voidsetName(const char * name) const
Constructor Detail

IlcAnySetArray

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

IlcAnySetArray

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

IlcAnySetArray

public IlcAnySetArray(IloSolver solver, IlcInt size, IlcAnySet * values)

This constructor creates an array of sets; the length of that array is size; its elements are initialized with the values indicated by values.


IlcAnySetArray

public IlcAnySetArray(IloSolver solver, IlcInt size, IlcAnyArray array)

This constructor creates an array of sets; the length of that array is size; its elements are initialized with the values indicated by array.


IlcAnySetArray

public IlcAnySetArray(IloSolver solver, IlcInt size, const IlcAnySet exp...)

This constructor creates an array of sets; the length of that array is size; its elements are initialized with the arguments of type IlcAnySet. The number of arguments of type IlcAnySet must be the same as size.


Method Detail

getImpl

public IlcIntSetArrayI * 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.

getSize

public IlcInt getSize() const

This member function returns the number of elements in the invoking array.


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 IlcAnySetArray & 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 IlcAnySet & operator[](IlcInt i) const

This operator returns a reference to the element at rank i. This operator can be used for accessing the element or for modifying 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.