NO FRAMES

Class IloRangeArray

Definition file: ilconcert/ilolinear.h
IloRangeArray is the array class of ranges for a model.

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 * i=0)
public IloRangeArray(const IloEnv env, IloInt n=0)
public IloRangeArray(const IloEnv env, IloInt n, IloNum lb, IloNum ub)
public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumExprArray rows, const IloNumArray ubs)
public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, const IloNumArray ubs)
public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumExprArray rows, IloNum ub)
public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, IloNum ub)
public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloNumExprArray rows, const IloIntArray ubs)
public IloRangeArray(const IloEnv env, IloNum lb, const IloNumExprArray rows, const IloIntArray ubs)
public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloNumExprArray rows, IloNum ub)
public IloRangeArray(const IloEnv env, const IloNumArray lbs, const IloNumArray ubs)
public IloRangeArray(const IloEnv env, const IloIntArray lbs, const IloIntArray ubs)
public IloRangeArray(const IloEnv env, IloNum lb, const IloNumArray ubs)
public IloRangeArray(const IloEnv env, const IloNumArray lbs, IloNum ub)
public IloRangeArray(const IloEnv env, IloNum lb, const IloIntArray ubs)
public IloRangeArray(const IloEnv env, const IloIntArray lbs, IloNum ub)
Method Summary
public voidadd(IloInt more, const IloRange range)
public voidadd(const IloRange range)
public voidadd(const IloRangeArray array)
public IloNumColumnoperator()(const IloNumArray vals)
public IloNumColumnoperator()(const IloIntArray vals)
public IloRangeoperator[](IloInt i) const
public IloRange &operator[](IloInt i)
public voidsetBounds(const IloIntArray lbs, const IloIntArray ubs)
public voidsetBounds(const IloNumArray lbs, const IloNumArray ubs)
Inherited Methods from IloConstraintArray
add, add, add, operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements, setNames
Constructor Detail

IloRangeArray

public IloRangeArray(IloDefaultArrayI * i=0)

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


IloRangeArray

public IloRangeArray(const IloEnv env, IloInt n=0)

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 argument more specifies 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) const

This operator returns a reference to the object located in the invoking array at the position specified by the index i. On const arrays, Concert Technology uses the const operator:

 IloRange operator[] (IloInt i) const;
 

operator[]

public IloRange & operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position specified 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.