NO FRAMES

Class IloNumToAnySetStepFunctionCursor

Definition file: ilconcert/ilosetfunc.h
Allows you to inspect the contents of an IloNumToAnySetStepFunction.

An instance of the class IloNumToAnySetStepFunctionCursor allows you to inspect the contents of an IloNumToAnySetStepFunction. 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, functions that change the structure of the step function, such as IloNumToAnySetStepFunction::set, should not be called while the cursor is being used.

See Also:

Constructor and Destructor Summary
public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunction)
public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunction, IloNum x)
public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunctionCursor &)
Method Summary
public IloAnySetgetComplementSet() const
public IloNumgetSegmentMax() const
public IloNumgetSegmentMin() const
public IloAnySetgetSet() const
public IloBoolisEmpty() const
public IloBoolisFull() const
public IloBoolok() const
public voidoperator++()
public voidoperator--()
public voidoperator=(const IloNumToAnySetStepFunctionCursor &)
public voidseek(IloNum)
public IloBoolusesComplementaryRepresentation() const
Constructor and Destructor Detail

IloNumToAnySetStepFunctionCursor

public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunction)

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 first step of the function.


IloNumToAnySetStepFunctionCursor

public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunction, 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)).


IloNumToAnySetStepFunctionCursor

public IloNumToAnySetStepFunctionCursor(const IloNumToAnySetStepFunctionCursor &)

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


Method Detail

getComplementSet

public IloAnySet getComplementSet() const

This member function returns the set representing the complement of the value of the step currently specified by the cursor. An instance of IloException is thrown if the value of the step does not use a complementary representation.


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.


getSet

public IloAnySet getSet() const

This member function returns the value of the step currently specified by the cursor. An instance of IloException is thrown if the value of the step uses a complementary representation.


isEmpty

public IloBool isEmpty() const

This member function returns IloTrue if the value of the current step is the empty set.


isFull

public IloBool isFull() const

This member function returns IloTrue if the value of the current step is the full set. (See also: IloNumToAnySetStepFunction::isFull).


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).


operator=

public void operator=(const IloNumToAnySetStepFunctionCursor &)

This operator assigns an address to the handle pointer of the invoking instance of IloNumToAnySetStepFunctionCursor. That address is the location of the implementation object of the argument cursor. After the execution of this operator, the invoking object and cursor both point to the same implementation object.


seek

public void seek(IloNum)

This member function sets the cursor to specify the step of the function that contains x. Note that if n is the number of steps of the step function traversed by the invoking iterator, the worst-case complexity of this member function is O(log(n)). An instance of IloException is thrown if x does not belong to the definition interval of the invoking function.


usesComplementaryRepresentation

public IloBool usesComplementaryRepresentation() const

This member function returns IloTrue if the value of the current step uses the complementary representation.