Gecode::IntSet Class Reference
[Integer variables, Set variables]
Integer sets.
More...
#include <int.hh>
Classes | |
| class | MinInc |
| Sort ranges according to increasing minimum. More... | |
Public Member Functions | |
| template<> | |
| IntSet (const IntSet &s) | |
| template<> | |
| IntSet (IntSet &s) | |
| template<> | |
| IntSet (const IntArgs &i) | |
| template<> | |
| IntSet (IntArgs &i) | |
Related Functions | |
| (Note that these are not member functions.) | |
| template<class Char , class Traits > | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const IntSet &s) |
| Print integer set s. | |
Predefined value | |
| static const IntSet | empty |
| Empty set. | |
Constructors and initialization | |
| IntSet (void) | |
| Initialize as empty set. | |
| IntSet (int n, int m) | |
| Initialize as range with minimum n and maximum m. | |
| IntSet (const int r[], int n) | |
| Initialize with n integers from array r. | |
| IntSet (const int r[][2], int n) | |
| Initialize with n ranges from array r. | |
| template<class I > | |
| IntSet (I &i) | |
| Initialize with range iterator i. | |
Range access | |
| int | ranges (void) const |
| Return number of ranges of the specification. | |
| int | min (int i) const |
| Return minimum of range at position i. | |
| int | max (int i) const |
| Return maximum of range at position i. | |
| unsigned int | width (int i) const |
| Return width of range at position i. | |
Entire set access | |
| unsigned int | size (void) const |
| Return size (cardinality) of set. | |
| unsigned int | width (void) const |
| Return width of set (distance between maximum and minimum). | |
| int | min (void) const |
| Return minimum of entire set. | |
| int | max (void) const |
| Return maximum of entire set. | |
Detailed Description
Integer sets.Integer sets are the means to specify arbitrary sets of integers to be used as domains for integer variables.
Definition at line 129 of file int.hh.
Constructor & Destructor Documentation
| Gecode::IntSet::IntSet | ( | void | ) | [inline] |
| Gecode::IntSet::IntSet | ( | int | n, | |
| int | m | |||
| ) | [inline] |
Initialize as range with minimum n and maximum m.
Note that the set is empty if n is larger than m
Definition at line 93 of file int-set-1.hpp.
| Gecode::IntSet::IntSet | ( | const int | r[], | |
| int | n | |||
| ) | [inline] |
| Gecode::IntSet::IntSet | ( | const int | r[][2], | |
| int | n | |||
| ) | [inline] |
Initialize with n ranges from array r.
For position i in the array r, the minimum is r[i][0] and the maximum is r[i][1].
Definition at line 83 of file int-set-1.hpp.
| Gecode::IntSet::IntSet | ( | I & | i | ) | [inline, explicit] |
| Gecode::IntSet::IntSet | ( | const IntSet & | s | ) | [inline] |
Definition at line 72 of file int-set-1.hpp.
| Gecode::IntSet::IntSet | ( | IntSet & | s | ) | [inline] |
Definition at line 79 of file int-set-1.hpp.
| Gecode::IntSet::IntSet | ( | const IntArgs & | i | ) | [inline] |
Definition at line 44 of file int-set-2.hpp.
| Gecode::IntSet::IntSet | ( | IntArgs & | i | ) | [inline] |
Definition at line 52 of file int-set-2.hpp.
Member Function Documentation
| int Gecode::IntSet::ranges | ( | void | ) | const [inline] |
| int Gecode::IntSet::min | ( | int | i | ) | const [inline] |
| int Gecode::IntSet::max | ( | int | i | ) | const [inline] |
| unsigned int Gecode::IntSet::width | ( | int | i | ) | const [inline] |
| unsigned int Gecode::IntSet::size | ( | void | ) | const [inline] |
| unsigned int Gecode::IntSet::width | ( | void | ) | const [inline] |
Return width of set (distance between maximum and minimum).
Definition at line 141 of file int-set-1.hpp.
| int Gecode::IntSet::min | ( | void | ) | const [inline] |
| int Gecode::IntSet::max | ( | void | ) | const [inline] |
Friends And Related Function Documentation
| std::basic_ostream< Char, Traits > & operator<< | ( | std::basic_ostream< Char, Traits > & | os, | |
| const IntSet & | s | |||
| ) | [related] |
Member Data Documentation
const IntSet Gecode::IntSet::empty [static] |
The documentation for this class was generated from the following files:
- gecode/int.hh (Revision: 9095)
- gecode/int/int-set-1.hpp (Revision: 8364)
- gecode/int/int-set-2.hpp (Revision: 8326)
- gecode/int/int-set.cpp (Revision: 8019)
