| Overview | Group | Tree | Graph | Deprecated | Index | Concepts |

An instance of this class represents a set of numeric values. The same numeric
value will not appear more than once in a set. The elements of a set are not ordered.
The class IloNumSet::Iterator offers you a way to
traverse the elements of such a set.
If you are considering modeling issues where you want to represent repeated
elements or where you want to exploit an indexed order among the elements, then you
might want to look at the class IloNumArray for sets,
instead of this class.
Most member functions in this class contain assert statements. For an
explanation of the macro NDEBUG (a way to turn on or turn off these
assert statements), see the concept
Assert and NDEBUG.
See Also:
IloNumArray, IloNumSet::Iterator, IloNum, operator<<
| Method Summary | |
|---|---|
public void | add(IloNumSet set) |
public void | add(IloNum elt) |
public IloBool | contains(IloNumSet set) const |
public IloBool | contains(IloNum elt) const |
public void | empty() |
public IloNum | getFirst() const |
public IloNumSetI * | getImpl() const |
public IloNum | getLast() const |
public IloNum | getNext(IloNum value, IloInt offset=1) const |
public IloNum | getNextC(IloNum value, IloInt offset=1) const |
public IloNum | getPrevious(IloNum value, IloInt offset=1) const |
public IloNum | getPreviousC(IloNum value, IloInt offset=1) const |
public IloInt | getSize() const |
public | IloNumSet(const IloEnv env, const IloNumArray array, IloBool withIndex=IloFalse) |
public | IloNumSet(const IloEnv env, IloBool withIndex=IloFalse) |
public | IloNumSet(IloNumSetI * impl=0) |
public IloBool | intersects(IloNumSet set) const |
public void | remove(IloNumSet set) |
public void | remove(IloNum elt) |
public void | setIntersection(IloNumSet set) |
public void | setIntersection(IloNum elt) |
Inherited Methods from IloNumCollection |
|---|
getImpl, getValue, IloNumCollection |
Inherited Methods from IloDiscreteDataCollection |
|---|
getImpl, getIndex, getIndex, getIndex, getIndex, getIndex, getSize, IloDiscreteDataCollection, IloDiscreteDataCollection, isOrdered, isReversed, isSorted, iterator |
Inherited Methods from IloDataCollection |
|---|
display, end, getEnv, getName, isIntRange, isIntSet, isNumRange, isNumSet, isSymbolSet, isTupleSet, sort, sort, sort, sort |
| Inner Class | |
|---|---|
| IloNumSet::Iterator | This class is an iterator that traverses the elements of a finite set of numeric values. |
| Method Detail |
|---|
This constructor creates a set of numeric values in the environment
env from the elements in array.
The optional flag withIndex corresponds to the activation or not of internal
hash tables to improve speed of add/getIndex methods.
| env |
The environment in which you want to create the array.
|
| array |
An array of elements for the float set.
|
| withIndex |
A Boolean to specify whether to activate hash tables with this array.
|
This constructor creates an empty set
(no elements) in the environment
env. You must use the member function
IloNumSet::add
to fill this set with elements.
The optional flag withIndex
corresponds to the activation or not
of internal hash tables to improve speed of
add/getIndex methods.
| env |
The environment in which you want to create the empty array.
|
| withIndex |
A Boolean to specify whether to activate hash tables with this array.
|
This constructor creates a handle to a set of numeric values from its implementation object.
| impl |
A pointer to the implementation object of this class.
|
This member function adds set to the invoking set. By "adds,"
we mean that the invoking set becomes the union of its former elements and
the elements of set.
To calculate the arithmetic sum of values in an array, use the function
IloSum.
| set |
Need description here.
|
This member function adds elt to the invoking set. By "adds,"
we mean that the invoking set becomes the union of its former elements and
the new elt.
| elt |
Need description here.
|
This member function returns a
Boolean value (zero or one) that specifies
whether set intersects the invoking set.
The value one specifies
that the invoking set contains all the elements
of set, and that
the intersection of the invoking set with set
is precisely set.
The value zero specifies that the intersection of the invoking set
set is not precisely set.
| set |
The set containing all the values to be tested.
|
set is an element of the invoking set. This member function returns a
Boolean value (zero or one) that specifies
whether elt is an element of the invoking set.
The value one
specifies that the invoking set contains elt;
the value zero
specifies that the invoking set does not contain elt.
| elt |
The element to be looked for in the set.
|
elt is an element of the invoking set. This member function removes all the elements from the invoking set. In other words, the invoking set becomes the empty set.
Returns the first item of the collection.
See Also:
This member function returns a pointer to the implementation object of the invoking set.
Returns the last item of the collection.
See Also:
This method returns the value next to the given argument in the set.
If the given value does not exist, it throws an exception.
If no value follows (that is, you are at the end of the set), it throws an exception.
See Also:
IloNumSet::getNextC, IloNumSet::getPreviousC for circular search. , IloIntSet
| value |
The value you want to return the value next to.
|
This method returns the value next to the given argument in the set.
If the given value does not exist, it throws an exception.
If no value follows (that is, you are at the end of the set), it will give you the first value (circular search).
See Also:
IloNumSet::getNext, IloNumSet::getPrevious, IloIntSet
| value |
The value you want to return the value next to.
|
This method returns the value previous to the given argument in the set.
If the given value does not exist, it throws an exception.
If no value is previous (that is, you are at the beginning of the set), it throws an exception.
See Also:
IloNumSet::getNextC, IloNumSet::getPreviousC for circular search. , IloIntSet
| value |
The value you want to return the value previous to.
|
This method returns the value previous to the given argument in the set.
If the given value does not exist, it throws an exception.
If no value is previous (that is, you are at the beginning of the set), it will give you the last value (circular search).
See Also:
IloNumSet::getNext, IloNumSet::getPrevious, IloIntSet
| value |
The value you want to return the value previous to.
|
This member function returns an integer specifying the size of the invoking set (that is, how many elements it contains).
This member function returns a
Boolean value (zero or one) that specifies
whether
set intersects the invoking set.
The value one specifies that the
intersection of set and the invoking
set is not empty (at least one
element in common); the value zero specifies that the intersection of
set and the invoking set is empty
(no elements in common).
| set |
The set containing all the values to be tested.
|
set is an element of the invoking set. This member function removes all the elements of set from the
invoking set.
| set |
Need description here.
|
This member function removes elt from the invoking set.
If the set does not contain this element, no error is raised
| elt |
Need description here.
|
This member function changes the invoking set so that it includes only the
elements of set. In other words, the invoking set becomes the
intersection of its former elements with the elements of set.
| set |
Need description here.
|
This member function changes the invoking set
so that it includes only the
element specified by elt.
In other words, the invoking set becomes
the intersection of its former elements with elt.
| elt |
Need description here.
|