Skip to main content
FRAMES NO FRAMES

Class IlcFloatVarArray

Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Map of IlcFloatVarArrayIlcFloatVarArrayIlcFloatVarArray
The array class for the class IlcFloatVar.

The class IlcFloatVarArray is the class for an array of instances of IlcFloatVar. Instances of this class are arrays indexed from 0.

See Also:

Method Summary
public IlcFloatVarArraygetCopy() const
public IlcFloatgetMaxMax() const
public IlcFloatgetMaxMax(IlcInt indexMin, IlcInt indexMax) const
public IlcFloatgetMaxMin() const
public IlcFloatgetMaxMin(IlcInt indexMin, IlcInt indexMax) const
public IlcFloatgetMinMax() const
public IlcFloatgetMinMax(IlcInt indexMin, IlcInt indexMax) const
public IlcFloatgetMinMin() const
public IlcFloatgetMinMin(IlcInt indexMin, IlcInt indexMax) const
public IlcIntgetSize() const
public IlcFloatVarArray(IlcCPEngine solver, IlcInt size)
public IlcFloatVarArray(IlcCPEngine solver, IlcInt size ILCPARAM, const IlcFloatVar v1)
public IlcFloatVarArray(IlcCPEngine solver, IlcInt size, IlcFloat min, IlcFloat max)
public IlcFloatVar &operator[](IlcInt index) const
Method Detail

IlcFloatVarArray

public IlcFloatVarArray(IlcCPEngine solver, IlcInt size)

This constructor creates an uninitialized array of length size. The index range of the array is [0 size). The argument size must be strictly greater than 0 (zero). Each element of the array must be assigned before the array can be used.


IlcFloatVarArray

public IlcFloatVarArray(IlcCPEngine solver, IlcInt size ILCPARAM, const IlcFloatVar v1)

This constructor creates an array of length size. Its constrained variables are initialized with the list of variables provided as arguments to the constructor. The number of IlcFloatVar arguments must be equal to size.


IlcFloatVarArray

public IlcFloatVarArray(IlcCPEngine solver, IlcInt size, IlcFloat min, IlcFloat max)

This constructor creates an array of size constrained variables. The argument size must be strictly greater than 0 (zero). Each constrained variable has a domain containing all floating-point values between min and max.


getCopy

public IlcFloatVarArray getCopy() const

This member function returns a copy of the invoking array of constrained variables and associates that copy with cp.


getMaxMax

public IlcFloat getMaxMax() const

This member function returns the largest of the maximal values of the variables belonging to the invoking array of constrained variables.


getMaxMax

public IlcFloat getMaxMax(IlcInt indexMin, IlcInt indexMax) const

This member function returns the largest of the maximal values of the variables belonging to the invoking array of constrained variables. When the arguments indexMin and indexMax are provided, only those variables that correspond to indices in the range [indexMin indexMax) are considered. CP Optimizer will throw an exception (an instance of IloException) with the message "bad index interval" if the given indexMin and indexMax are not valid indices for the invoking array of constrained variables or if indexMin is not strictly less than indexMax.


getMaxMin

public IlcFloat getMaxMin() const

This member function returns the largest of the minimal values of the variables belonging to the invoking array of constrained variables.


getMaxMin

public IlcFloat getMaxMin(IlcInt indexMin, IlcInt indexMax) const

This member function returns the largest of the minimal values of the variables belonging to the invoking array of constrained variables. When the arguments indexMin and indexMax are provided, only those variables that correspond to indices in the range [indexMin indexMax) are considered. CP Optimizer will throw an exception (an instance of IloException) with the message "bad index interval" if the given indexMin and indexMax are not valid indices for the invoking array of constrained variables or if indexMin is not strictly less than indexMax.


getMinMax

public IlcFloat getMinMax() const

This member function returns the smallest of the maximal values of the variables belonging to the invoking array of constrained variables.


getMinMax

public IlcFloat getMinMax(IlcInt indexMin, IlcInt indexMax) const

This member function returns the smallest of the maximal values of the variables belonging to the invoking array of constrained variables. When the arguments indexMin and indexMax are provided, only those variables that correspond to indices in the range [indexMin indexMax) are considered. CP Optimizer will throw an exception (an instance of IloException) with the message "bad index interval" if the given indexMin and indexMax are not valid indices for the invoking array of constrained variables or if indexMin is not strictly less than indexMax.


getMinMin

public IlcFloat getMinMin() const

This member function returns the smallest of the minimal values of the variables belonging to the invoking array of constrained variables.


getMinMin

public IlcFloat getMinMin(IlcInt indexMin, IlcInt indexMax) const

This member function returns the smallest of the minimal values of the variables belonging to the invoking array of constrained variables. When the arguments indexMin and indexMax are provided, only those variables that correspond to indices in the range [indexMin indexMax) are considered. CP Optimizer will throw an exception (an instance of IloException) with the message "bad index interval" if the given indexMin and indexMax are not valid indices for the invoking array of constrained variables or if indexMin is not strictly less than indexMax.


getSize

public IlcInt getSize() const

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


operator[]

public IlcFloatVar & operator[](IlcInt index) const

This subscripting operator returns a reference to a constrained variable corresponding to the given index in the invoking array of constrained variables. CP Optimizer will throw an exception (an instance of IloException) with the message "bad index" if the given index is not a valid one for the invoking array of constrained variables.