
Class representing a set of tuples. More...
#include <gecode/int.hh>
Classes | |
| class | CSupportWord |
| Compressed support data for one tuple-word block. More... | |
| class | Range |
| Range information. More... | |
| class | ValueData |
| Data about values in the table. More... | |
| class | Data |
| Data stored for a Table. More... | |
| class | Ranges |
| Iterator over ranges. More... | |
Public Types | |
| typedef int * | Tuple |
| Type of a tuple. | |
| typedef Gecode::Support::BitSetData | BitSetData |
| Import bit set data type. | |
Protected Member Functions | |
| Data & | data (void) const |
| Get data (must be initialized and finalized). | |
| Data & | raw (void) const |
| Get raw data (must be initialized). | |
| void | _add (const IntArgs &t) |
| Add tuple t to tuple set. | |
| bool | equal (const TupleSet &t) const |
| Test whether tuple set is equal to t. | |
| Protected Member Functions inherited from Gecode::SharedHandle | |
| SharedHandle::Object * | object (void) const |
| Access to the shared object. | |
| void | object (SharedHandle::Object *n) |
| Modify shared object. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class Char, class Traits> | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const TupleSet &ts) |
Initialization | |
| TupleSet (void) | |
| Construct an uninitialized tuple set. | |
| TupleSet (int a) | |
| Initialize for a tuple set with arity a. | |
| void | init (int a) |
| Initialize an uninitialized tuple set. | |
| TupleSet (const TupleSet &t) | |
| Initialize by TupleSet t (tuple set is shared). | |
| TupleSet & | operator= (const TupleSet &t) |
| Assignment operator. | |
| TupleSet (int a, const DFA &dfa) | |
| Initialize with DFA dfa for arity a using dense supports. | |
| TupleSet (int a, const DFA &dfa, ExtensionalPropKind epk) | |
| Initialize with DFA dfa for arity a and representation epk. | |
| operator bool (void) const | |
| Test whether tuple set has been initialized. | |
| bool | operator== (const TupleSet &t) const |
| Test whether tuple set is equal to t. | |
| bool | operator!= (const TupleSet &t) const |
| Test whether tuple set is different from t. | |
Addition and finalization | |
| TupleSet & | add (const IntArgs &t) |
| Add tuple t to tuple set. | |
| bool | finalized (void) const |
| Is tuple set successfully finalized. | |
| bool | failed (void) const |
| Has tuple-set finalization failed. | |
| void | finalize (void) |
| Finalize tuple set with dense support data. | |
| void | finalize (ExtensionalPropKind epk) |
| Finalize tuple set with representation epk. | |
Tuple access | |
| int | arity (void) const |
| Arity of tuple set. | |
| int | tuples (void) const |
| Number of tuples. | |
| unsigned int | words (void) const |
| Return number of required bit set words. | |
| Tuple | operator[] (int i) const |
| Get tuple i. | |
| int | min (void) const |
| Return minimal value in all tuples. | |
| int | max (void) const |
| Return maximal value in all tuples. | |
| std::size_t | hash (void) const |
| Return hash key. | |
| ExtensionalPropKind | representation (void) const |
| Return materialized tuple-set representation. | |
Range access and iteration | |
| const Range * | fst (int i) const |
| Return first range for position i. | |
| const Range * | lst (int i) const |
| Return last range for position i. | |
Additional Inherited Members | |
| Public Member Functions inherited from Gecode::SharedHandle | |
| SharedHandle (void) | |
| Create shared handle with no object pointing to. | |
| SharedHandle (SharedHandle::Object *so) | |
| Create shared handle that points to shared object so. | |
| SharedHandle (const SharedHandle &sh) | |
| Copy constructor maintaining reference count. | |
| SharedHandle & | operator= (const SharedHandle &sh) |
| Assignment operator maintaining reference count. | |
| ~SharedHandle (void) | |
| Destructor that maintains reference count. | |
| operator bool (void) const | |
| Whether handle points to an object. | |
Class representing a set of tuples.
A TupleSet is used for storing an extensional representation of a constraint. After a TupleSet is finalized, no more tuples may be added to it.
| typedef int* Gecode::TupleSet::Tuple |
|
inline |
Construct an uninitialized tuple set.
Definition at line 169 of file tuple-set.hpp.
| Gecode::TupleSet::TupleSet | ( | int | a | ) |
Initialize for a tuple set with arity a.
| Gecode::TupleSet::TupleSet | ( | const TupleSet & | t | ) |
Initialize by TupleSet t (tuple set is shared).
| Gecode::TupleSet::TupleSet | ( | int | a, |
| const DFA & | dfa ) |
Initialize with DFA dfa for arity a using dense supports.
| Gecode::TupleSet::TupleSet | ( | int | a, |
| const DFA & | dfa, | ||
| ExtensionalPropKind | epk ) |
Initialize with DFA dfa for arity a and representation epk.
|
inlineprotected |
Get data (must be initialized and finalized).
Definition at line 211 of file tuple-set.hpp.
|
inlineprotected |
Get raw data (must be initialized).
Definition at line 220 of file tuple-set.hpp.
|
protected |
Add tuple t to tuple set.
|
protected |
Test whether tuple set is equal to t.
| void Gecode::TupleSet::init | ( | int | a | ) |
Initialize an uninitialized tuple set.
|
inline |
Test whether tuple set has been initialized.
Definition at line 172 of file tuple-set.hpp.
|
inline |
Test whether tuple set is equal to t.
Definition at line 265 of file tuple-set.hpp.
|
inline |
Test whether tuple set is different from t.
Definition at line 228 of file tuple-set.hpp.
Add tuple t to tuple set.
Definition at line 164 of file tuple-set.hpp.
|
inline |
Is tuple set successfully finalized.
Definition at line 199 of file tuple-set.hpp.
|
inline |
Has tuple-set finalization failed.
A failed tuple set is terminal: no tuples can be added and finalization cannot be attempted again.
Definition at line 205 of file tuple-set.hpp.
|
inline |
Finalize tuple set with dense support data.
Definition at line 177 of file tuple-set.hpp.
|
inline |
Finalize tuple set with representation epk.
Explicit representation selection materializes only the selected support representation. EPK_AUTO selects dense or compressed support according to the normal size and density policy and never selects sparse support. Tuple-set posting uses the selected concrete representation. If finalization throws, the tuple set is terminal and failed().
Definition at line 188 of file tuple-set.hpp.
|
inline |
Arity of tuple set.
Definition at line 232 of file tuple-set.hpp.
|
inline |
Number of tuples.
Definition at line 236 of file tuple-set.hpp.
|
inline |
Return number of required bit set words.
Definition at line 240 of file tuple-set.hpp.
|
inline |
Get tuple i.
Definition at line 252 of file tuple-set.hpp.
|
inline |
Return minimal value in all tuples.
Definition at line 244 of file tuple-set.hpp.
|
inline |
Return maximal value in all tuples.
Definition at line 248 of file tuple-set.hpp.
|
inline |
Return hash key.
Definition at line 278 of file tuple-set.hpp.
|
inline |
Return materialized tuple-set representation.
Definition at line 283 of file tuple-set.hpp.
|
inline |
Return first range for position i.
Definition at line 256 of file tuple-set.hpp.
|
inline |
Return last range for position i.
Definition at line 260 of file tuple-set.hpp.
|
Print TupleSet ts
Definition at line 355 of file tuple-set.hpp.