Overview | Group | Tree | Graph | Index | Concepts |
IlcConstAnyArray
is the unchanging, constant array class for
the basic enumerated class. You cannot modify the values of elements of such
an array. When you build an instance of this class, its constructor
systematically copies the array passed to it. This is a handle class. The
implementation class for IlcConstAnyArray
is the undocumented
class IlcConstIntArrayI
. Instances of this class are useful,
for example, in the function IlcTableConstraint
when you want to share an array
rather than copy it.
See Also:
IlcAnyArray, IlcTableConstraint, operator<<
Constructor Summary | |
---|---|
public | IlcConstAnyArray() |
public | IlcConstAnyArray(IlcConstIntArrayI * impl) |
public | IlcConstAnyArray(IloSolver s, IlcInt size, IlcAny * values) |
public | IlcConstAnyArray(IloSolver solver, IlcInt size, const IlcAny exp0, const IlcAny exp...) |
public | IlcConstAnyArray(IloSolver solver, IlcAnyArray array) |
Method Summary | |
---|---|
public void | display(ostream & str) const |
public IlcConstIntArrayI * | getImpl() const |
public IlcInt | getSize() const |
public IloSolver | getSolver() const |
public void | operator=(const IlcConstAnyArray & h) |
public IlcAny | operator[](IlcInt i) const |
Constructor Detail |
---|
This constructor creates an empty handle. You must initialize it before you use it.
This constructor creates a handle object from a pointer to an implementation object.
This constructor creates a constant array containing the values in the array values
. The argument size
must be the length of the array values
; it must also be strictly greater than 0 (zero). Solver does not keep a pointer to the array values
.
This constructor accepts a variable number of arguments. Its first argument, size
,
indicates the length of the array that this constructor will create; size
must
be the same as the number of instances of IlcAny
passed as arguments; it must
also be strictly greater than 0 (zero). The constructor creates a constant array of the values
indicated by the other arguments.
This constructor creates a constant version of array
.
Method Detail |
---|
This member function is called by the operator <<
. The string IlcConstIntArrayI
will be printed on the given output stream, followed by the display of all the elements of the array enclosed by brackets.
This member function returns a pointer to the implementation object of the invoking handle.
This member function returns the number of elements in the array.
This member function returns an instance of IloSolver
associated with the invoking object.
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.
This operator returns the element at index i
. This operator can be used for accessing (that is, simply reading) the element.