Overview | Group | Tree | Graph | Index | Concepts |
An instance of the class IlcIntToFloatSegmentFunctionCursor
allows you to inspect the contents of a piecewise linear function. A segment
of an instance of IlcIntToFloatSegmentFunction
is defined as an interval
[x1
, x2)
over which the function is linear.
Cursors iterate forward or backward over the segments of a piecewise linear
function.
IlcIntToFloatSegmentFunction::setValue
, should not be called while a cursor is in use.See Also:
Constructor and Destructor Summary | |
---|---|
public | IlcIntToFloatSegmentFunctionCursor(const IlcIntToFloatSegmentFunction &, IlcInt x) |
Method Summary | |
---|---|
public IlcInt | getSegmentMax() const |
public IlcInt | getSegmentMin() const |
public IlcFloat | getValue(IlcInt t) const |
public IlcFloat | getValueLeft() const |
public IlcFloat | getValueRight() const |
public IlcBool | ok() const |
public void | operator++() |
public void | operator--() |
Constructor and Destructor Detail |
---|
This constructor creates a cursor to inspect the piecewise linear
function argument. This cursor lets you iterate forward or backward over the
segments of the function. The cursor initially indicates the segment of the
function that contains x
.
Method Detail |
---|
This member function returns the right-most point of the segment currently indicated by the cursor.
This member function returns the left-most point of the segment currently indicated by the cursor.
This member function returns the value of the function at time
t
. t
must be inside the segment currently
indicated by the cursor, that is in time interval [getSegmentMin(),
getSegmentMax())
. An instance of
IloSolver::SolverErrorException
is thrown otherwise.
This member function returns the value of the function at the left-most point of the segment currently indicated by the cursor.
This member function returns the value of the function at the right-most point of the segment currently indicated by the cursor.
This member function returns IlcFalse
if the cursor does not
currently indicate a segment included in the interval of definition of the
piecewise linear function. Otherwise, it returns IlcTrue
. An
attempt to use the cursor after ok
returns
IlcFalse
leads to undefined behavior.
This operator moves the cursor to the segment adjacent to the current segment (forward move).
This operator moves the cursor to the segment adjacent to the current segment (backward move).