FRAMES NO FRAMES

Class IlcIntToFloatExpFunction

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

It is sometimes useful to associate a constrained variable with an element of the domain of a constrained variable. If the elements of a domain are objects, the associated values can correspond to a specific constrained attribute of these objects.

The following constraints and expressions use this kind of indirection: IlcSum, IlcMin, IlcMax, and IlcUnion.

IlcIntToFloatExpFunction is the handle class of the object that makes the correspondence between an integer element and a constrained floating-point expression or variable.

An object of this handle class uses the virtual member function IlcIntToFloatExpFunctionI::getValue from its implementation class to obtain the associated constrained variable or expression of an element of a domain.

See Also:

Constructor Summary
public IlcIntToFloatExpFunction()
public IlcIntToFloatExpFunction(IlcIntToFloatExpFunctionI * impl)
Method Summary
public IlcIntToFloatExpFunctionI *getImpl() const
public IlcFloatExpgetValue(IlcInt i) const
public voidoperator=(const IlcIntToFloatExpFunction & h)
Constructor Detail

IlcIntToFloatExpFunction

public IlcIntToFloatExpFunction()

This constructor creates an empty handle. You must initialize it before you use it.


IlcIntToFloatExpFunction

public IlcIntToFloatExpFunction(IlcIntToFloatExpFunctionI * impl)

This constructor creates a handle object from a pointer to an implementation object.


Method Detail

getImpl

public IlcIntToFloatExpFunctionI * 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.


getValue

public IlcFloatExp getValue(IlcInt i) const

This member function returns the constrained floating-point variable or expression associated with the integer element i.


operator=

public void operator=(const IlcIntToFloatExpFunction & 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.