NO FRAMES

Class IloNumToNumStepFunctionCursor

Definition file: ilconcert/ilonumfunc.h
Allows you to inspect the contents of an instance of IloNumToNumStepFunction.

An instance of the class IloNumToNumStepFunctionCursor allows you to inspect the contents of an instance of IloNumToNumStepFunction. A step of a step function is defined as an interval [x1,x2) over which the value of the function is the same. Cursors are intended to iterate forward or backward over the steps of a step function.

Note
The structure of the step function cannot be changed while a cursor is being used to inspect it. Therefore, methods that change the structure of the step function, such as IloNumToNumStepFunction::setValue, should not be called while the cursor is being used.

See Also:

Constructor and Destructor Summary
public IloNumToNumStepFunctionCursor(const IloNumToNumStepFunction, IloNum x)
public IloNumToNumStepFunctionCursor(const IloNumToNumStepFunctionCursor &)
Method Summary
public IloNumgetSegmentMax() const
public IloNumgetSegmentMin() const
public IloNumgetValue() const
public IloBoolok() const
public voidoperator++()
public voidoperator--()
public voidseek(IloNum)
Constructor and Destructor Detail

IloNumToNumStepFunctionCursor

public IloNumToNumStepFunctionCursor(const IloNumToNumStepFunction, IloNum x)

This constructor creates a cursor to inspect the step function argument. This cursor lets you iterate forward or backward over the steps of the function. The cursor initially specifies the step of the function that contains x.

Note that if n is the number of steps of the function given as argument, the worst-case complexity of this constructor is O(log(n)).


IloNumToNumStepFunctionCursor

public IloNumToNumStepFunctionCursor(const IloNumToNumStepFunctionCursor &)

This constructor creates a new cursor that is a copy of the argument cursor. The new cursor initially specifies the same step and the same function as the argument cursor.


Method Detail

getSegmentMax

public IloNum getSegmentMax() const

This member function returns the right-most point of the step currently specified by the cursor.


getSegmentMin

public IloNum getSegmentMin() const

This member function returns the left-most point of the step currently specified by the cursor.


getValue

public IloNum getValue() const

This member function returns the value of the step currently specified by the cursor.


ok

public IloBool ok() const

This member function returns IloFalse if the cursor does not currently specify a step included in the definition interval of the step function. Otherwise, it returns IloTrue.


operator++

public void operator++()

This operator moves the cursor to the step adjacent to the current step (forward move).


operator--

public void operator--()

This operator moves the cursor to the step adjacent to the current step (backward move).


seek

public void seek(IloNum)

This member function sets the cursor to specify the step of the function that contains x. An IloException is thrown if x does not belong to the definition interval of the step function associated with the invoking cursor.