FRAMES NO FRAMES

Class IlcGranularFunctionCursor

Definition file: ilsched/gfbase.h
Include file: <ilsched/ilsched.h>

An instance of IlcGranularFunctionCursor traverses the segments of a granular function.

See Also:

Constructor Summary
public IlcGranularFunctionCursor(const IlcGranularFunction func, IlcInt x)
Method Summary
public IlcIntgetSegmentMax() const
public IlcIntgetSegmentMin() const
public IlcIntgetValue() const
public IlcBoolok() const
public voidoperator++()
public voidoperator--()
Constructor Detail

IlcGranularFunctionCursor

public IlcGranularFunctionCursor(const IlcGranularFunction func, IlcInt 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 IlcInt getSegmentMax() const

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


getSegmentMin

public IlcInt getSegmentMin() const

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


getValue

public IlcInt getValue() const

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


ok

public IlcBool ok() const

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


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.