36 namespace Gecode {
namespace Set {
namespace LDSB {
43 if (n != y.
lubSize())
return false;
44 for (
unsigned int i = 0 ;
i <
n ;
i++)
53 namespace Gecode {
namespace Int {
namespace LDSB {
104 unsigned int seqNum = posIt / seq_size;
105 unsigned int seqPos = posIt % seq_size;
106 for (
unsigned int seq = 0 ; seq < n_seqs ; seq++) {
110 if (x[getVal(seq, seqPos)].
assigned()) {
114 const unsigned int *firstSeq = &indices[seqNum*seq_size];
115 const unsigned int *secondSeq = &indices[seq*seq_size];
116 for (
unsigned int i = 0 ;
i < seq_size ;
i++) {
144 unsigned int seqNum = location.first;
145 unsigned int seqPos = location.second;
146 for (
unsigned int seq = 0 ; seq < n_seqs ; seq++) {
147 if (seq == seqNum)
continue;
148 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.
int _value
The value of the literal. For int and bool variables, this is the value itself; for set variables...
int _variable
Variable index. The ViewArray that the index is meant for is assumed to be known by context...
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
Value iterator for values in an offset bitset.
Post propagator for SetVar SetOpType SetVar y
bool assigned(void) const
Test whether view is assigned.
Heap heap
The single global heap.
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.
void values(Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF)
Post constraint .
Post propagator for SetVar x
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.