FRAMES NO FRAMES

Class IlcIntTimetableCursor

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

Objects of the class IlcIntTimetableCursor allow you to inspect the contents of integer timetables. A region of an integer timetable is a subinterval [timeMin, timeMax) of the interval where the timetable is defined such that all the times in the region share the same information and any two adjacent regions store different information. Cursors are intended to iterate forward or backward over the regions of an integer timetable.

Note
The structure of a timetable cannot be changed while a cursor is being used to inspect the timetable. Therefore functions that change the structure of the timetable should not be called while the cursor is being used; for example, IlcIntTimetable::setMax.

See Also:

Constructor and Destructor Summary
public IlcIntTimetableCursor(const IlcIntTimetable table, IlcInt time)
Method Summary
public IlcIntgetMax() const
public IlcIntgetMin() const
public IlcIntgetTimeMax() const
public IlcIntgetTimeMin() const
public IlcIntgetValue() const
public IlcBoolisBound() const
public IlcBoolok() const
public voidoperator++()
public voidoperator--()
Constructor and Destructor Detail

IlcIntTimetableCursor

public IlcIntTimetableCursor(const IlcIntTimetable table, IlcInt time)

This constructor creates a cursor to inspect the information stored in the integer timetable table. This cursor lets you to iterate forward or backward over the regions composing the timetable. The cursor initially indicates the region containing time.


Method Detail

getMax

public IlcInt getMax() const

This member function returns the maximal possible value of the current region. All the times in the current region share the same maximal value.


getMin

public IlcInt getMin() const

This member function returns the minimal possible value of the current region. All the times in the current region share the same minimal value.


getTimeMax

public IlcInt getTimeMax() const

This member function returns the time ending the region currently indicated by the cursor.


getTimeMin

public IlcInt getTimeMin() const

This member function returns the time beginning the region currently indicated by the cursor.


getValue

public IlcInt getValue() const

This member function returns the value of the region that the invoking timetable cursor indicates. An instance of IloSolver::SolverErrorException is thrown if the timetable is not bound at the cursor position.


isBound

public IlcBool isBound() const

This member function returns IlcTrue if the region indicated by the invoking timetable cursor has been bound; that is, its maximum value is equal to its minimum value. Otherwise, it returns IlcFalse.


ok

public IlcBool ok() const

This member function returns IlcFalse if the cursor does not currently indicate a region included in the timetable. Otherwise, it returns IlcTrue. Any attempt to use the cursor after ok() returns IlcFalse could lead to undefined behavior.


operator++

public void operator++()

This operator moves the cursor to the region adjacent "on the right" to the current region (forward iteration).


operator--

public void operator--()

This operator moves the cursor to the region adjacent "on the left" to the current region (backward iteration).