70 if (excess == 0) resize();
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();
int min(void) const
Minimum domain element.
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 tuples(void) const
Number of tuples.
Reify imp(BoolVar x)
Use implication for reification.
Gecode::IntArgs i(4, 1, 2, 3, 4)
unsigned int size(I &i)
Size of all ranges of range iterator i.
unsigned int domsize
Domain size.
TupleSetI(void)
Initialize as empty tuple set.
Tuple operator[](int i) const
Get tuple i.
int min
Minimum and maximum in domain-values.
bool finalized(void) const
Is datastructure finalized.
Passing integer arguments.
int max(void) const
Maximum domain element.
Class represeting a set of tuples.
TupleSet(void)
Construct empty tuple set.
bool finalized(void) const
Is tuple set finalized.
void add(T t)
Add Tuple. Assumes that arity matches.
SharedHandle::Object * object(void) const
Access to the shared object.
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.