Gecode::TupleSet Class Reference
[Extensional constraints]
#include <int.hh>
Inherits Gecode::SharedHandle.
Detailed Description
Data stored for a Table.Class represeting 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.
Definition at line 44 of file tuple-set.icc.
Public Types | |
typedef int * | Tuple |
Type of a tuple. | |
Public Member Functions | |
template<class T> | |
void | add (T t) |
Add Tuple. Assumes that arity matches. | |
void | finalize (void) |
Finalize datastructure (disallows additions of more Tuples). | |
void | resize (void) |
Resize data cache. | |
bool | finalized (void) const |
Is datastructure finalized. | |
TupleSetI (void) | |
Initialize as empty tuple set. | |
virtual | ~TupleSetI (void) |
Delete implementation. | |
virtual SharedHandle::Object * | copy (void) const |
Create a copy. | |
TupleSetI * | implementation (void) |
Get implementation. | |
TupleSet (void) | |
Construct empty tuple. | |
TupleSet (const TupleSet &d) | |
Initialize by TupleSet d (tuple set is shared). | |
void | add (const IntArgs &tuple) |
Add tuple to tuple set. | |
void | finalize (void) |
Finalize tuple set. | |
bool | finalized (void) const |
Is tuple set finalized. | |
int | arity (void) const |
Arity of tuple set. | |
int | tuples (void) const |
Number of tuples. | |
Tuple | operator[] (int i) const |
Get tuple i. | |
int | min (void) const |
Minimum domain size. | |
int | max (void) const |
Maximum domain size. | |
TupleSet (Reflection::VarMap &vm, Reflection::Arg *arg) | |
Initialize TupleSet from reflection specification. | |
Reflection::Arg * | spec (Reflection::VarMap &vm) const |
Create reflection specification for the TupleSet. | |
Public Attributes | |
int | arity |
Arity. | |
int | size |
Number of Tuples. | |
Tuple ** | tuples |
Tuples index. | |
Tuple * | tuple_data |
Tuple index data. | |
int * | data |
Tuples data. | |
int | excess |
Excess storage. | |
int | min |
Minimum and maximum in domain-values. | |
int | max |
int | domsize |
Domain size. | |
Tuple ** | last |
Initial last structure. | |
Tuple * | nullptr |
Pointer to NULL-pointer. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &, const Gecode::TupleSet &ts) |
Member Typedef Documentation
typedef int* Gecode::TupleSet::Tuple |
Constructor & Destructor Documentation
virtual Gecode::TupleSet::~TupleSetI | ( | void | ) | [virtual] |
Delete implementation.
Gecode::TupleSet::TupleSet | ( | void | ) | [inline] |
Gecode::TupleSet::TupleSet | ( | const TupleSet & | d | ) | [inline] |
Gecode::TupleSet::TupleSet | ( | Reflection::VarMap & | vm, | |
Reflection::Arg * | arg | |||
) |
Member Function Documentation
void Gecode::TupleSet::add | ( | T | t | ) | [inline] |
Add Tuple. Assumes that arity matches.
void Gecode::TupleSet::finalize | ( | void | ) | [inline] |
Finalize datastructure (disallows additions of more Tuples).
Definition at line 154 of file tuple-set.icc.
void Gecode::TupleSet::resize | ( | void | ) |
Resize data cache.
bool Gecode::TupleSet::finalized | ( | void | ) | const [inline] |
Gecode::TupleSet::TupleSetI | ( | void | ) |
Initialize as empty tuple set.
virtual SharedHandle::Object* Gecode::TupleSet::copy | ( | void | ) | const [virtual] |
Create a copy.
TupleSet::TupleSetI * Gecode::TupleSet::implementation | ( | void | ) | [inline] |
void Gecode::TupleSet::add | ( | const IntArgs & | tuple | ) | [inline] |
void Gecode::TupleSet::finalize | ( | void | ) |
Finalize tuple set.
bool Gecode::TupleSet::finalized | ( | void | ) | const |
Is tuple set finalized.
int Gecode::TupleSet::arity | ( | void | ) | const |
Arity of tuple set.
int Gecode::TupleSet::tuples | ( | void | ) | const |
Number of tuples.
TupleSet::Tuple Gecode::TupleSet::operator[] | ( | int | i | ) | const [inline] |
int Gecode::TupleSet::min | ( | void | ) | const |
Minimum domain size.
int Gecode::TupleSet::max | ( | void | ) | const |
Maximum domain size.
Reflection::Arg * Gecode::TupleSet::spec | ( | Reflection::VarMap & | vm | ) | const |
Friends And Related Function Documentation
std::ostream & operator<< | ( | std::ostream & | , | |
const Gecode::TupleSet & | ts | |||
) | [related] |
Print TupleSet ts
Definition at line 90 of file tuple-set.cc.
Member Data Documentation
int Gecode::TupleSet::arity [inline] |
int Gecode::TupleSet::tuples [inline] |
int Gecode::TupleSet::min [inline] |
int Gecode::TupleSet::max [inline] |
Definition at line 60 of file tuple-set.icc.
The documentation for this class was generated from the following files:
- gecode/int/extensional/tuple-set.icc (Revision: 6102)
- gecode/int.hh (Revision: 7494)
- gecode/int/extensional/tuple-set.cc (Revision: 7288)