This method assumes that state function
f is fixed. It returns the end of the
ith segment of the
state function f.
Namespace: ILOG.CP
Assembly: oplall (in oplall.dll)
Syntax
| C# |
|---|
public int GetSegmentEnd( IStateFunction f, int i ) |
Remarks
A segment is an interval [start, end) on which the value of f is constant. If the state function is not defined, the value is CP.NoState, elsewhere the value is a non-negative integer. An assertion is violated if state function f is not fixed.
This method can be used to print the content of a state function as illustrated by the following code sample.
Examples
for (int i=0; i < cp.GetNumberOfSegments(f); ++i)
Console.WriteLine("[" + cp.GetSegmentStart(f, i)
+ "," + cp.GetSegmentEnd(f, i)
+ "):" + cp.GetSegmentValue(f, i) );
For more information on state function see the concept State Functions in the C++ Reference Manual.