Overview | Group | Tree | Graph | Index | Concepts |
Finite sets of discrete, enumerated floating-point numbers are instances
of the handle class IlcFloatSet
. These sets are used by Solver
to represent the domains of enumerated constrained variables and to
represent the values of constrained set variables. Solver provides an
efficient, optimized implementation of finite sets of floating-point
numbers. These finite sets are known formally as instances of the handle
class IlcFloatSet
.
The elements of finite sets of type IlcFloatSet
are
floating-point numbers of type IlcFloat
. The
implementation class for finite sets of floating-point numbers is the
undocumented class IlcFloatSetI
.
To traverse an existing finite set, either exhaustively or in search of
an element, Solver provides iterators (such as instances of IlcFloatSetIterator
). An iterator is an object constructed
from a data structure (such as a set or an array) and contains a traversal
state of this data structure.
See Also:
IlcFloat, IlcFloatExp, IlcFloatExpIterator, IlcFloatSetIterator, IlcFloatVar, IlcFloatVarDeltaIterator
Constructor Summary | |
---|---|
public | IlcFloatSet() |
public | IlcFloatSet(IlcFloatSetI * impl) |
public | IlcFloatSet(const IlcFloatArray array, IlcBool fullSet=IlcTrue) |
public | IlcFloatSet(IloSolver solver, const IlcFloatArray array, IlcBool fullSet=IlcTrue) |
Method Summary | |
---|---|
public IlcBool | add(IlcFloat elt) |
public IlcFloatSet | copy() const |
public IlcFloatSetI * | getImpl() const |
public IlcInt | getSize() const |
public IloSolver | getSolver() const |
public IlcBool | isIn(IlcFloat elt) const |
public void | operator=(const IlcFloatSet & h) |
public IlcBool | remove(IlcFloat elt) |
Constructor Detail |
---|
This constructor creates an empty handle. You must initialize it before you use it.
This constructor creates a handle object from a pointer to an implementation object.
This constructor also creates a finite set of floating-point numbers
containing the elements of array
.
This constructor creates a finite set of floating-point numbers containing
the elements of array
. If array
contains multiple
copies of a given value, that value will appear only one time in the newly created
finite set. If the argument fullSet
is equal to IlcTrue
,
its default value, the finite set will initially contain all its possible values.
Otherwise, the finite set will initially be empty. In any case, the possible elements
of the finite set are exactly those elements in array
.
Method Detail |
---|
This member function adds elt
to the invoking finite set if elt
is a possible member of that set and if elt
is not already in that set. When both
conditions are met, this member function returns IlcTrue
. Otherwise, it returns
IlcFalse
. The effects of this member function are reversible.
This member function creates and returns a finite set that contains the same elements as the invoking finite set.
This member function returns a pointer to the implementation object of the invoking handle.
This member function returns the size of a finite set. Clearly, this member function is useful for testing whether the invoking finite set is empty or not.
This member function returns an instance of IloSolver
associated with the invoking object.
This member function is a predicate that indicates whether or not elt
is in the
invoking finite set. It returns IlcTrue
if elt
is in the set; otherwise, it returns
IlcFalse
.
This operator assigns an address to the handle pointer of the invoking object. That address is the location of the implementation object of the provided argument.
This member function removes elt
from the invoking finite set. This member function
returns IlcTrue
if elt
was not in that invoking set; otherwise, it returns
IlcFalse
. The effects of this member function are reversible.