FRAMES NO FRAMES

Class IloGranularFunction::Cursor

Definition file: ilsched/ilogfbase.h
Include file: <ilsched/iloscheduler.h>

An instance of IloGranularFunction::Cursor traverses the segments of a granular function.

See Also:

Constructor Summary
public Cursor(const IloGranularFunction func, IloNum x)
Method Summary
public IloNumgetSegmentMax() const
public IloNumgetSegmentMin() const
public IloNumgetValue() const
public IloBoolok() const
public voidoperator++()
public voidoperator--()
Constructor Detail

Cursor

public Cursor(const IloGranularFunction func, IloNum x)

This constructor creates a cursor to traverse the segments of the granular function func. It is initialized at the segment containing the position x. If this position is invalid, an error will be raised.


Method Detail

getSegmentMax

public IloNum getSegmentMax() const

This member function returns the right-most valid position pertaining to the current segment.


getSegmentMin

public IloNum getSegmentMin() const

This member function returns the left-most valid position pertaining to the current segment.


getValue

public IloNum getValue() const

This member function returns the value taken by the function on the current segment.


ok

public IloBool ok() const

This member function returns IloTrue if the current position of the cursor is a valid one. Otherwise, it returns IloFalse.


operator++

public void operator++()

This left-increment operator shifts the current position of the cursor to the next segment of the function.


operator--

public void operator--()

This left-decrement operator shifts the current position of the cursor to the previous segment of the function.