Overview | Group | Tree | Graph | Index | Concepts |
An instance of IloNumToAnySetStepFunction
represents a step
function that associates sets with intervals. It is defined everywhere on an
interval [xMin,xMax). Each interval [x1,x2) on which the
function has the same set is called a step.
Note that if n is the number of steps of the function, the
random access to a given step (see the member functions IloNumToAnySetStepFunction::add
, IloNumToAnySetStepFunction::alwaysIntersects
,
IloNumToAnySetStepFunction::contains
, IloNumToAnySetStepFunction::empty
, IloNumToAnySetStepFunction::everContains
,
IloNumToAnySetStepFunction::everIntersects
, IloNumToAnySetStepFunction::fill
, IloNumToAnySetStepFunction::getComplementSet
,
IloNumToAnySetStepFunction::getSet
, IloNumToAnySetStepFunction::intersects
, IloNumToAnySetStepFunction::isEmpty
,
IloNumToAnySetStepFunction::isFull
, IloNumToAnySetStepFunction::remove
, IloNumToAnySetStepFunction::set
, and
IloNumToAnySetStepFunction::setIntersection
) has a worst-case complexity
of O(log(n)).
Complementary Representation of Values
IloNumToAnySetStepFunction
allows the implicit
representation of infinite sets through the representation of the complement
of the actual set value. This, for example, allows you to completely fill a
set (using the IloNumToAnySetStepFunction::fill
member function) and
then specify the elements that are not in the set. Under normal
circumstances, it is not necessary to know if the value of the step function
at a particular point is represented by the set or its complement: all the
member functions that manipulate the step function value will correctly
adapt to either representation. The only case where it is necessary to know
the internal representation is if you want to directly access the set that
represents a value (using the IloNumToAnySetStepFunction::getSet
or
IloNumToAnySetStepFunction::getComplementSet
member functions). In that
circumstance only, it is necessary to use the IloNumToAnySetStepFunction::usesComplementaryRepresentation
member function to determine
the internal representation, and then use either IloNumToAnySetStepFunction::getSet
or IloNumToAnySetStepFunction::getComplementSet
depending on the return value of IloNumToAnySetStepFunction::usesComplementaryRepresentation
. Note that IloNumToAnySetStepFunction::getSet
will raise an error if it is used to access a set
that is represented as a complement set. IloNumToAnySetStepFunction::getComplementSet
will raise an error if it is used to access
a set that is directly represented.
See Also:
IloNumToAnySetStepFunctionCursor
Constructor Summary | |
---|---|
public | IloNumToAnySetStepFunction(const IloEnv, IloNum, IloNum, const char *) |
public | IloNumToAnySetStepFunction(const IloEnv, IloNum, IloNum, const IloAnySet, const char *) |
Constructor Detail |
---|
This constructor creates a step function defined everywhere on the
interval [xMin, xMax)
with empty set as the value.
This constructor creates a step function defined everywhere on the
interval [xMin, xMax)
with the same set dval
.
Method Detail |
---|
This member function adds the value of f
at point
x
to the value of the invoking step function at point
x
, for all points x
in the definition interval of
the invoking step function. An instance of IloException
is
thrown if the definition interval of f
is not equal to the
definition interval of the invoking step function.
This member function adds elt
to the value of the invoking
step function on the interval [xMin, xMax)
.
This member function adds the elements of elts
to the value
of the invoking step function on the interval [xMin, xMax)
.
This member function returns IloTrue
if for all points
x
on the definition interval of the invoking step function, the
value of f
at point x
is a subset of the value of
the invoking step function at point x
. An instance of
IloException
is thrown if the definition interval of
f
is not equal to the definition interval of the invoking step
function.
This member function returns IloTrue
if elts
is
a subset of the value of the invoking step function at all points on the
interval [xMin, xMax)
.
This member function returns IloTrue
if at all points on the
interval [xMin, xMax)
the value of the invoking step function
contains elt
.
This member function returns IloTrue
if for all points
x
in the definition interval of the invoking step function, the
intersection of f
and the invoking step function is not empty.
An instance of IloException
is thrown if the definition
interval of f
is not equal to the definition interval of the
invoking step function.
This member function returns IloTrue
if for all
x
on the interval [xMin, xMax)
the intersection of
elts
and the value of the invoking step function at point
x
is not empty.
This member function returns IloTrue
if elts
is
a subset of the value of the invoking step function at point
x
.
This member function returns IloTrue
if the invoking step
function contains element elt
at point x
.
This member function multiplies by k
the scale of
x
for the invoking step function. k
must be a
non-negative numerical value. More precisely, if the invoking step 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 sets the value of the invoking step function on the
interval [xMin, xMax)
to be the empty set.
This member function returns IloTrue
if at any point
x
in the definition interval of the invoking step function,
f
at point x
is a subset of the invoking step
function at point x
. An instance of IloException
is thrown if the definition interval of f
is not equal to the
definition interval of the invoking step function.
This member function returns IloTrue
if at any point on the
interval [xMin, xMax)
elts
is a subset of the
value of the invoking step function.
This member function returns IloTrue
if at any point on the
interval [xMin, xMax)
the value of the invoking step function
contains elt
.
This member function returns IloTrue
if at some point
x
in the definition interval of the invoking step function, the
intersection of f
and the invoking step function is not empty.
An instance of IloException
is thrown if the definition
interval of f
is not equal to the definition interval of the
invoking step function.
This member function returns IloTrue
if at any point
x
on the interval [xMin, xMax)
the intersection of
elts
and the value of the invoking step function at point
x
is not empty.
This member function sets the value of the invoking step function on the
interval [xMin, xMax)
to be the full set.
This member function returns the complement of the value of the invoking
step function at point x
. An instance of
IloException
is thrown if the invoking step function at point
x
does not use the complementary representation. See
Complementary Representation of Values for more information.
This member function returns the right-most point of the definition interval of the invoking step function.
This member function returns the left-most point of the definition interval of the invoking step function.
This member function returns the value of the invoking step function at
point x
. An instance of IloException
is thrown if
the invoking step function at point x
uses the complementary
representation. See Complementary Representation of Values for more
information.
This member function returns IloTrue
if the intersection of
elts
and the value of the invoking step function at point
x
is not empty.
This member function returns IloTrue
if the function is
empty at point x
. In other words, a return of
IloTrue
means that the member function IloNumToAnySetStepFunction::empty
has been applied to point x
and no
elements have been subsequently added to the value of the invoking step
function at point x
.
This member function returns IloTrue
if the function is full
at point x
. In other words, a return of IloTrue
means that the member function IloNumToAnySetStepFunction::fill
has been
applied to point x
and no elements have been subsequently
removed from the value of the invoking step function at point
x
.
This member function removes the value of f
from the value
of the invoking step function at all points on the definition interval of
the invoking step function. An instance of IloException
is
thrown if the definition interval of f
is not equal to the
definition interval of the invoking step function.
This member function removes elt
from the value of the
invoking step function on the interval
[xMin, xMax)
.
This member function removes all the elements in elts
from
the value of the invoking step function on the interval
[xMin, xMax)
.
This member function sets the value of the invoking step function to be
elt
on the interval [xMin, xMax)
.
This member function sets the value of the invoking step function to be
elts
on the interval [xMin, xMax)
.
This member function assigns the value of the invoking step function at
all points x
on the definition interval of the invoking step
function to be the intersection of the value of f
at point
x
and the value of the invoking step function at point
x
. An instance of IloException
is thrown if the
definition interval of f
is not equal to the definition
interval of the invoking step function.
This member function assigns the value of the invoking step function at
all points x
on the interval [xMin, xMax)
to be
the intersection of the set containing elt
and the value of the
invoking set function at point x
.
This member function assigns the value of the invoking step function at
all points x
on the interval [xMin, xMax)
to be
the intersection of elts
and the value of the invoking set
function at point x
.
This member function initializes the invoking step function as a function
that repeats the step function f
, n
times after
x0
. More precisely, if f
is defined on
[xfpMin,xfpMax)
and if the invoking step function is defined on
[xMin,xMax)
, the value of the invoking step function will
be:
dval
on [xMin, x0)
, f((x-x0) % (xfpMax-xfpMin))
for x
in
[x0, Min(x0+n*(xfpMax-xfpMin), xMax))
, anddval
on [Min(x0+n*(xfpMax-xfpMin), xMax), xMax)
This member function shifts the invoking step 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 step function is
defined on [xMin,xMax)
and dx > 0
, the new
value of the invoking step 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 step function
is:
x
in [xMin, xMax+dx)
, the former value
at x-dx
, dval
on the interval [xMax+dx, xMax)
.This member function returns IloTrue
if the value of the
invoking function at point x
is represented by a complementary
set, rather than by directly representing the value as a set itself. See
Complementary Representation of Values for more information.