74 for (
int i = arity;
i--; ) {
104 assert(imp->
arity == -1 ||
137 assert(imp->
arity != -1);
170 template<
class Char,
class Traits,
class T>
171 std::basic_ostream<Char,Traits>&
172 operator <<(std::basic_ostream<Char,Traits>& os,
const TupleSet& ts) {
173 std::basic_ostringstream<Char,Traits> s;
174 s.copyfmt(os); s.width(0);
175 s <<
"Number of tuples: " << ts.
tuples() << std::endl
176 <<
"Tuples:" << std::endl;
177 for (
int i = 0;
i < ts.tuples(); ++
i) {
179 for (
int j = 0; j < ts.arity(); ++j) {
181 s <<
" " << ts[
i][j];
185 return os << s.str();
Tuple operator[](int i) const
Get tuple i.
void finalize(void)
Finalize tuple set.
int size(void) const
Return size of array (number of elements)
int arity(void) const
Arity of tuple set.
int excess
Excess storage.
int * Tuple
Type of a tuple.
int max(void) const
Maximum domain element.
void resize(void)
Resize data cache.
bool finalized(void) const
Is datastructure finalized.
bool finalized(void) const
Is tuple set finalized.
Reify imp(BoolVar x)
Use implication for reification.
int tuples(void) const
Number of tuples.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Tuple ** last
Initial last structure.
SharedHandle::Object * object(void) const
Access to the shared object.
unsigned int domsize
Domain size.
TupleSetI(void)
Initialize as empty tuple set.
Tuple ** tuples
Tuples index.
int min
Minimum and maximum in domain-values.
Tuple * nullpointer
Pointer to nullptr-pointer.
Passing integer arguments.
Tuple * tuple_data
Tuple index data.
Class represeting a set of tuples.
TupleSet(void)
Construct empty tuple set.
int min(void) const
Minimum domain element.
void add(T t)
Add Tuple. Assumes that arity matches.
void finalize(void)
Finalize datastructure (disallows additions of more Tuples)
int size
Number of Tuples.
Gecode toplevel namespace
void add(const IntArgs &tuple)
Add tuple to tuple set.
TupleSetI * implementation(void)
Get implementation.