40 namespace Gecode {
namespace Set {
namespace LDSB {
46 unsigned int n =
x.lubSize();
48 for (
unsigned int i = 0 ;
i <
n ;
i++)
57 namespace Gecode {
namespace Int {
namespace LDSB {
63 if (indices.valid(
l._variable) && indices.get(
l._variable)) {
90 lits[j++] =
Literal(
l._variable,
i.val());
103 if (
l._variable < (
int)lookup_size) {
104 int posIt = lookup[
l._variable];
108 unsigned int seqNum = posIt / seq_size;
109 unsigned int seqPos = posIt % seq_size;
110 for (
unsigned int seq = 0 ; seq < n_seqs ; seq++) {
118 const unsigned int *firstSeq = &indices[seqNum*seq_size];
119 const unsigned int *secondSeq = &indices[seq*seq_size];
120 for (
unsigned int i = 0 ;
i < seq_size ;
i++) {
146 std::pair<int,int> location =
findVar(
values, n_values, seq_size,
l._value);
148 unsigned int seqNum = location.first;
149 unsigned int seqPos = location.second;
150 for (
unsigned int seq = 0 ; seq < n_seqs ; seq++) {
151 if (seq == seqNum)
continue;
152 if (dead_sequences.get(seq))
continue;
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
A Literal is a pair of variable index and value.
std::pair< int, int > findVar(int *indices, unsigned int n_values, unsigned int seq_size, int index)
Find the location of an integer in a collection of sequences.
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Heap heap
The single global heap.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Argument array for non-primitive types.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Set view for set variables
void values(Home home, const IntVarArgs &x, IntSet y, IntConLevel icl=ICL_DEF)
Post constraint .
Value iterator for values in an offset bitset.
bool assigned(void) const
Test whether view is assigned.
Node * x
Pointer to corresponding Boolean expression node.
bool assigned(View x, int v)
Whether x is assigned to value v.
bool equalLUB(const Set::SetView &x, const Set::SetView &y)
Do two set variables have equal least-upper-bounds?
Stack with arbitrary number of elements.
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Gecode toplevel namespace
ArgArray< T > dynamicStackToArgArray(const Support::DynamicStack< T, A > &s)
Convert a DynamicStack<T,A> into an ArgArray<T>
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
void push(const T &x)
Push element x on top of stack.
Bitsets with index offset.