Overview | Group | Tree | Graph | Index | Concepts |
An instance of IlcIntToFloatSegmentFunction
represents a
continuous or discontinuous piecewise linear function over integers on an
interval [xmin
, xmax
). The member functions of the
class IlcIntToFloatSegmentFunction
are not reversible.
See Also:
IlcIntToFloatSegmentFunctionCursor
Constructor Summary | |
---|---|
public | IlcIntToFloatSegmentFunction() |
public | IlcIntToFloatSegmentFunction(IlcSegmentedFunctionI * impl) |
public | IlcIntToFloatSegmentFunction(IlcManager m, IlcInt xmin=IloIntMin, IlcInt xmax=IloIntMax, IlcFloat dval=0.) |
public | IlcIntToFloatSegmentFunction(IlcManager m, IlcIntArray x, IlcFloatArray v, IlcInt xmin=IloIntMin, IlcInt xmax=IloIntMax) |
public | IlcIntToFloatSegmentFunction(const IlcIntToIntStepFunction & f) |
Method Summary | |
---|---|
public void | addValue(IlcInt x1, IlcInt x2, IlcFloat v) |
public void | dilate(IlcInt k) |
public IlcFloat | getArea(IlcInt x1, IlcInt x2) const |
public IlcInt | getDefinitionIntervalMax() const |
public IlcInt | getDefinitionIntervalMin() const |
public IlcSegmentedFunctionI * | getImpl() const |
public IlcFloat | getMax(IlcInt x1, IlcInt x2) const |
public IlcFloat | getMin(IlcInt x1, IlcInt x2) const |
public const char * | getName() const |
public IlcAny | getObject() const |
public IloSolver | getSolver() const |
public IloSolverI * | getSolverI() const |
public IlcFloat | getValue(IlcInt x) const |
public void | operator*=(IlcFloat k) |
public void | operator+=(const IlcIntToFloatSegmentFunction & fct) |
public void | operator-=(const IlcIntToFloatSegmentFunction & fct) |
public void | operator=(const IlcIntToFloatSegmentFunction & h) |
public void | setName(const char * name) const |
public void | setObject(IlcAny object) const |
public void | setPeriodic(const IlcIntToFloatSegmentFunction & f, IlcInt x0, IlcInt n=IlcIntMax, IlcFloat dval=0) |
public void | setPoints(IlcIntArray x, IlcFloatArray v) |
public void | setValue(IlcInt x1, IlcFloat v1, IlcInt x2, IlcFloat v2) |
public void | setValue(IlcInt x1, IlcInt x2, IlcFloat v) |
public void | shift(IlcInt dx, IlcFloat dval=0) |
Constructor Detail |
---|
This constructor creates an integer piecewise linear function defined
everywhere on the interval [xmin,xmax)
with the same value
dval
.
This constructor creates an integer piecewise linear function defined
everywhere on the interval [xmin,xmax)
; its steps are defined
by the two arrays of parameters, x
and v
. More
precisely, the size n
of array x
must be equal to
the size of array v
and, if the created function is defined on
the interval [xmin,xmax)
, its values will be:
v[0]
on interval
[xmin,x[0])
,
v[i]+ (t-x[i])(v[i+1]-v[i])/(x[i+1]-x[i])
for
t
in
[x[i],x[i+1])
for all
i
in
[0,n-2]
such that
x[i-1] <> x[i]
, and
v[n-1]
on interval
[x[n-1],xmax)
.This copy constructor creates a new piecewise linear function. This new
piecewise linear function is a copy of the integer step function
f
. They point to different implementation objects.
Method Detail |
---|
This member function increases the value of the invoking piecewise linear
function by v
everywhere on the interval [x1,x2)
.
This member function multiplies the scale of x
by
k
for the invoking piecewise linear function. The parameter
k
must be a positive integer.
More precisely, if the invoking function was defined over an interval
[xmin,xmax)
, it will be redefined over the interval
[k*xmin,k*xmax)
and the value at x
will be the
former value at x/k
.
This member function returns the area of the invoking piecewise linear
function over the interval [x1,x2)
. If the interval
[x1,x2)
is not included in the interval of definition of the
invoking function, an error will be raised.
This member function returns the right-most point of the interval of definition of the invoking piecewise linear function.
This member function returns the left-most point of the interval of definition of the invoking piecewise linear function.
This member function returns the maximal value of the invoking piecewise
linear function on the interval [x1,x2)
. If the interval
[x1,x2)
is not included in the definition interval of the
invoking function, an error will be raised.
This member function returns the minimal value of the invoking piecewise
linear function on the interval [x1,x2)
. If the interval
[x1,x2)
is not included in the definition interval of the
invoking function, an error will be raised.
This member function returns an instance of IloSolver
associated with the invoking object.
This member function returns a pointer to the implementation object of the solver where the invoking object was extracted.
This member function returns the value of the invoking piecewise linear
function at x
. If x
does not belong to the
definition interval of the invoking function, an error will be raised.
This operator multiplies the value of the invoking
integer step function by a factor k
everywhere on the interval of definition.
This operator adds the parameter function fct
to the
invoking piecewise linear function.
This operator subtracts the parameter function fct
from the
invoking piecewise linear function.
This member function initializes the invoking function as a piecewise
linear function that repeats the piecewise linear function f
,
n
times after x0
.
More precisely, if f
is defined on
[xfmin,xfmax)
and if the invoking function is defined on
[xmin,xmax)
, the value of the invoking function will be:
dval
on
[xmin, x0)
,
f((x-x0) % (xfmax-xfmin))
for
x
in
[x0, Min(x0+n*(xfmax-xfmin), xmax))
, and
dval
on
[Min(x0+n*(xfmax-xfmin), xmax), xmax)
This member function initializes the invoking function as a piecewise
linear function whose segments are defined by the two parameter arrays
x
and v
.
More precisely, the size n
of array x
must be
equal to the size of array v
and, if the created function is
defined on the interval [xmin,xmax)
, its values will be:
v[0]
on interval
[xmin,x[0])
,
v[i]+ (t-x[i])(v[i+1]-v[i])/(x[i+1]-x[i])
for
t
in
[x[i],x[i+1])
for all
i
in
[0,n-2]
such that
x[i-1] <> x[i]
, and
v[n-1]
on interval
[x[n-1],xmax)
.This member function sets the value of the invoking piecewise linear
function to be v
on the interval [x1,x2)
.
This member function shifts the invoking function from dx
to
the right if dx
> 0 or from -dx
to the left if
dx
< 0. It has no effect if dx
= 0.
More precisely, if the invoking function is defined on
[xmin,xmax)
and dx
> 0, the new value of the
invoking function is:
dval
on the interval
[xmin,xmin+dx)
,
x
in
[xmin+dx,xmax)
, the former value at
x-dx
. If dx
< 0, the new value of the invoking function is:
x
in
[xmin,xmax+dx)
, the former value at
x-dx
,
dval
on the interval
[xmax+dx,xmax)
.