47 class FullTupleCompare {
54 FullTupleCompare(
int a) : arity(a) {}
57 operator ()(
const Tuple&
a,
const Tuple&
b) {
58 for (
int i = 0;
i < arity;
i++)
73 class TuplePosCompare {
80 TuplePosCompare(
int p) : pos(p) {}
83 operator ()(
const Tuple& a,
const Tuple& b) {
102 for (
int i = arity;
i--; )
104 int real_min =
min, real_max =
max;
106 min = real_min;
max = real_max;
118 for (
int i = arity;
i--; )
120 for (
int i = size;
i--; )
123 FullTupleCompare ftc(arity);
125 assert(
tuples[0][size-1][0] == ia[0]);
127 for (
int t = size;
t--; )
128 for (
int i = arity;
i--; )
136 for (
int i = arity;
i--; )
137 for (
int t = size;
t--; )
139 for (
int i = arity;
i-->1; ) {
140 TuplePosCompare tpc(
i);
146 for (
int i = arity;
i--; ) {
149 while (t && *t && (*t)[
i] <
static_cast<int>(
min+
d)) {
152 if (t && *t && (*t)[
i] ==
static_cast<int>(
min+
d)) {
167 int ndatasize =
static_cast<int>(1+
size*1.5);
169 excess = ndatasize -
size;
194 for (
int i = arity;
i--; )
196 for (
int a = arity; a--; ) {
197 for (
int i = size;
i--; ) {
204 for (
int i = static_cast<int>(domsize)*
arity;
i--; ) {
static T * copy(T *d, const T *s, long unsigned int n)
Copy n objects starting at s to d.
int min(void) const
Minimum domain element.
void rfree(void *p)
Free memory block starting at p.
int arity(void) const
Arity of tuple set.
int excess
Excess storage.
bool pos(const View &x)
Test whether x is postive.
void resize(void)
Resize data cache.
const int max
Largest allowed integer value.
int tuples(void) const
Number of tuples.
Heap heap
The single global heap.
int p
Number of positive literals for node type.
T * alloc(long unsigned int n)
Allocate block of n objects of type T from heap.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void quicksort(Type *l, Type *r, Less &less)
Standard quick sort.
Tuple ** last
Initial last structure.
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual SharedHandle::Object * copy(void) const
Create a copy.
unsigned int domsize
Domain size.
Tuple ** tuples
Tuples index.
int min
Minimum and maximum in domain-values.
Tuple * nullpointer
Pointer to NULL-pointer.
bool finalized(void) const
Is datastructure finalized.
Passing integer arguments.
Tuple * tuple_data
Tuple index data.
int max(void) const
Maximum domain element.
bool finalized(void) const
Is tuple set finalized.
void add(T t)
Add Tuple. Assumes that arity matches.
void finalize(void)
Finalize datastructure (disallows additions of more Tuples)
virtual ~TupleSetI(void)
Delete implementation.
T * realloc(T *b, long unsigned int n, long unsigned int m)
Reallocate block of n objects starting at b to m objects of type T from heap.
int size
Number of Tuples.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.