NO FRAMES

Class IloRangeArray

Definition file: ilconcert/ilolinear.h

For each basic type, Concert Technology defines a corresponding array class. IloRangeArray is the array class of ranges for a model.

Instances of IloRangeArray are extensible. That is, you can add more elements to such an array. References to an array change whenever an element is added to or removed from the array.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

For information on arrays, see the concept Arrays

Note
IloRangeArray has access to member functions defined in the IloArray template.

See Also:

Constructor Summary
public IloRangeArray(IloDefaultArrayI *)
public IloRangeArray(const IloEnv, IloInt)
public IloRangeArray(const IloEnv, IloInt, IloNum, IloNum)
public IloRangeArray(const IloEnv, const IloNumArray, const IloNumExprArray, const IloNumArray)
public IloRangeArray(const IloEnv, IloNum, const IloNumExprArray, const IloNumArray)
public IloRangeArray(const IloEnv, const IloNumArray, const IloNumExprArray, IloNum)
public IloRangeArray(const IloEnv, IloNum, const IloNumExprArray, IloNum)
public IloRangeArray(const IloEnv, const IloIntArray, const IloNumExprArray, const IloIntArray)
public IloRangeArray(const IloEnv, IloNum, const IloNumExprArray, const IloIntArray)
public IloRangeArray(const IloEnv, const IloIntArray, const IloNumExprArray, IloNum)
public IloRangeArray(const IloEnv, const IloNumArray, const IloNumArray)
public IloRangeArray(const IloEnv, const IloIntArray, const IloIntArray)
public IloRangeArray(const IloEnv, IloNum, const IloNumArray)
public IloRangeArray(const IloEnv, const IloNumArray, IloNum)
public IloRangeArray(const IloEnv, IloNum, const IloIntArray)
public IloRangeArray(const IloEnv, const IloIntArray, IloNum)
Method Summary
public voidadd(IloInt, const IloRange)
public voidadd(const IloRange)
public voidadd(const IloRangeArray)
public IloNumColumnoperator()(const IloNumArray)
public IloNumColumnoperator()(const IloIntArray)
public IloRangeoperator[](IloInt)
public IloRange &operator[](IloInt)
public voidsetBounds(const IloIntArray, const IloIntArray)
public voidsetBounds(const IloNumArray, const IloNumArray)
Inherited Methods from IloConstraintArray
add, add, add, operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements
Constructor Detail

IloRangeArray

public IloRangeArray(IloDefaultArrayI * i)

This default constructor creates an empty range array. You cannot create instances of the undocumented class IloDefaultArrayI. As a parameter in this default constructor, it allows you to pass 0 (zero) as a value to an optional parameter in functions and member functions that accept an array as a parameter.


IloRangeArray

public IloRangeArray(const IloEnv env, IloInt n)

This constructor creates an array of n elements, each of which is an empty handle.


IloRangeArray

public IloRangeArray(const IloEnv env, IloInt n, IloNum lb, IloNum ub)

This constructor creates an array of n elements, each with the lower bound lb and the upper bound ub.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumExprArray rows, const IloNumArray ubs)

This constructor creates an array of ranges from rows, an array of expressions. It uses the corresponding elements of the arrays lbs and ubs to set the lower and upper bounds of elements in the new array. The length of rows must equal the length of lbs and ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, const IloNumArray ubs)

This constructor creates an array of ranges from rows, an array of expressions. The lower bound of every element in the new array will be lb. The upper bound of each element of the new array will be the corresponding element of the array ubs. The length of rows must equal the length of ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumExprArray rows, IloNum ub)

This constructor creates an array of ranges from rows, an array of expressions. The upper bound of every element in the new array will be ub. The lower bound of each element of the new array will be the corresponding element of the array lbs. The length of rows must equal the length of lbs.


IloRangeArray

public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, IloNum ub)

This constructor creates an array of ranges from rows, an array of expressions. The lower bound of every element in the new array will be lb. The upper bound of every element in the new array will be ub.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloNumExprArray rows, const IloIntArray ubs)

This constructor creates an array of ranges from rows, an array of expressions. It uses the corresponding elements of the arrays lbs and ubs to set the lower and upper bounds of elements in the new array. The length of rows must equal the length of lbs and ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, const IloIntArray ubs)

This constructor creates an array of ranges from rows, an array of expressions. The lower bound of every element in the new array will be lb. The upper bound of each element of the new array will be the corresponding element of the array ubs. The length of rows must equal the length of ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloNumExprArray rows, IloNum ub)

This constructor creates an array of ranges from rows, an array of expressions. The upper bound of every element in the new array will be ub. The lower bound of each element of the new array will be the corresponding element of the array lbs. The length of rows must equal the length of lbs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumArray ubs)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the arrays lbs (or ubs). The number of elements in lbs must be equal to the number of elements in ubs. The lower bound of each element in the new array will be equal to the corresponding element in the array lbs. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloIntArray ubs)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the arrays lbs (or ubs). The number of elements in lbs must be equal to the number of elements in ubs. The lower bound of each element in the new array will be equal to the corresponding element in the array lbs. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, IloNum lb, const IloNumArray ubs)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the array ubs. The lower bound of every element in the new array will be equal to lb. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloNumArray lbs, IloNum ub)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the array ubs. The lower bound of every element in the new array will be equal to lb. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, IloNum lb, const IloIntArray ubs)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the array ubs. The lower bound of every element in the new array will be equal to lb. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


IloRangeArray

public IloRangeArray(const IloEnv env, const IloIntArray lbs, IloNum ub)

This constructor creates an array of ranges. The number of elements in the new array will be equal to the number of elements in the array ubs. The lower bound of every element in the new array will be equal to lb. The upper bound of each element in the new array will be equal to the corresponding element in the array ubs.


Method Detail

add

public void add(IloInt more, const IloRange range)

This member function appends range to the invoking array multiple times. The parameter more indicates how many times.


add

public void add(const IloRange range)

This member function appends range to the invoking array.


add

public void add(const IloRangeArray array)

This member function appends the elements in array to the invoking array.


operator()

public IloNumColumn operator()(const IloNumArray vals)

This operator constructs ranges in column representation. That is, it creates an instance of IloNumColumn that will add a newly created variable to all the ranged constraints in the invoking object, each as a linear term with the corresponding value specified in the array values.


operator()

public IloNumColumn operator()(const IloIntArray vals)

This operator constructs ranges in column representation. That is, it creates an instance of IloNumColumn that will add a newly created variable to all the ranged constraints in the invoking object, each as a linear term with the corresponding value specified in the array values.


operator[]

public IloRange operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position indicated by the index i. Concert Technology uses the const operator

IloRange operator[] (IloInt i) const;

on const arrays.


operator[]

public IloRange & operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position indicated by the index i.


setBounds

public void setBounds(const IloIntArray lbs, const IloIntArray ubs)

This member function does not change the array itself; instead, it changes the bounds of all the ranged constraints that are elements of the invoking array. At the same time, it also creates an instance of the undocumented class IloChange to notify Concert Technology algorithms about this change in an extractable object of the model. The elements of the arrays lbs and ubs may be integer or floating-point values. The size of the invoking array must be equal to the size of lbs and the size of ubs.

Note
The member function setBounds notifies Concert Technology algorithms about this change of bounds for all the elements in this invoking array.

setBounds

public void setBounds(const IloNumArray lbs, const IloNumArray ubs)

This member function does not change the array itself; instead, it changes the bounds of all the ranged constraints that are elements of the invoking array. At the same time, it also creates an instance of the undocumented class IloChange to notify Concert Technology algorithms about this change in an extractable object of the model. The elements of the arrays lbs and ubs may be integer or floating-point values. The size of the invoking array must be equal to the size of lbs and the size of ubs.

Note
The member function setBounds notifies Concert Technology algorithms about this change of bounds for all the elements in this invoking array.