FRAMES NO FRAMES

Class IlcIntSetArray

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

An instance of IlcIntSetArray represents an array of sets, instances of IlcIntSet.

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 IlcIntSetArray()
public IlcIntSetArray(IlcIntSetArrayI * impl)
public IlcIntSetArray(IloSolver solver, IlcInt size, IlcIntSet * values)
public IlcIntSetArray(IloSolver solver, IlcInt size, IlcIntArray array)
public IlcIntSetArray(IloSolver solver, IlcInt size, const IlcIntSet 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 IlcIntSetArray & h)
public IlcIntSet &operator[](IlcInt i) const
public voidsetName(const char * name) const
Constructor Detail

IlcIntSetArray

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

IlcIntSetArray

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

IlcIntSetArray

public IlcIntSetArray(IloSolver solver, IlcInt size, IlcIntSet * 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.


IlcIntSetArray

public IlcIntSetArray(IloSolver solver, IlcInt size, IlcIntArray 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.


IlcIntSetArray

public IlcIntSetArray(IloSolver solver, IlcInt size, const IlcIntSet exp...)

This constructor creates an array of sets; the length of that array is size; its elements are initialized with the arguments of type IlcIntSet. The number of arguments of type IlcIntSet 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 IlcIntSetArray & 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 IlcIntSet & operator[](IlcInt i) 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.