40 #ifndef __GECODE_INT_ELEMENT_HH__ 41 #define __GECODE_INT_ELEMENT_HH__ 51 namespace Gecode {
namespace Int {
namespace Element {
59 template<
class V0,
class V1,
class Idx,
class Val>
195 template<
class V0,
class V1>
203 template<
class ViewB>
class IdxView;
231 int size(
void)
const;
259 template<
class VA,
class VB,
class VC, PropCond pc_ac>
286 template<
class VA,
class VB,
class VC>
316 template<
class VA,
class VB,
class VC>
Domain consistent element propagator for array of views.
Val val(void) const
Return value of current index value pair.
int size(void) const
Return the current size.
IdxVal * iv
The index-value data structure.
bool marked(void) const
Return whether this pair is marked for removal.
IdxView< View > & operator [](int n)
Access element n.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
IdxSize s0
Size of x0 at last execution.
Value iterator for values in index-value map.
View(Space &home, bool share, View &p)
Constructor for cloning p.
Linked index-value pairs.
Idx val(void) const
Return index of current index value pair.
void operator++(void)
Move to next index value pair (next value)
IterValUnmark(IdxVal *iv)
Initialize with start.
Int(Space &home, bool shared, Int &p)
Constructor for cloning p.
IterVal(IdxVal *iv)
Initialize with start.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
const IdxVal * iv
Index-value pairs.
Base-class for propagators.
bool operator()(void) const
Test whether more pairs to be iterated.
static ExecStatus post(Home home, IdxViewArray< VA > &iv, VB x0, VC x1)
Post propagator for .
ValSize s1
Size of x1 at last execution.
Value iterator for indices in index-value map.
IntSharedArray c
Shared array of integer values.
Base-class for both propagators and branchers.
bool operator()(void) const
Test whether more pairs to be iterated.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
void update(Space &home, bool share, IdxViewArray< View > &x)
Cloning.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void cancel(Space &home, Propagator &p, PropCond pc)
Gecode::Support::IntTypeTraits< Val >::utype ValSize
Type for value size.
static ExecStatus post(Home home, IdxViewArray< VA > &iv, VB x0, VC x1)
Post propagator for .
IdxViewArray< VA > iv
Current index-view map.
Val val
The value Mark that this pair should be removed.
Value iterator for values in index-value map.
Idx idx_next
The position of the next pair in index order.
int PropCond
Type for propagation conditions.
void prune_val(void)
Prune values according to x1.
ModEventDelta med
A set of modification events (used during propagation)
Gecode::Support::IntTypeTraits< Idx >::utype IdxSize
Type for index size.
static ExecStatus post(Home home, IntSharedArray &i, V0 x0, V1 x1)
Post propagator for .
Base-class for element propagator for array of views.
void operator++(void)
Move to next index value pair (next index)
Traits to for information about integer types.
ByVal(const IdxVal *iv)
Initialize with index value pairs.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Integer view for integer variables.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as high binary)
Domain consistent pair propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Node * x
Pointer to corresponding Boolean expression node.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
ViewBnd(Space &home, bool share, ViewBnd &p)
Constructor for cloning p.
Class for pair of index and view.
An array of IndexView pairs.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
ViewDom(Space &home, bool share, ViewDom &p)
Constructor for cloning p.
Class to get VarArg type for view.
Val val(void) const
Return value of current index value pair.
ExecStatus post_int(Home home, IntSharedArray &c, V0 x0, V1 x1)
Post propagator with apropriate index and value types.
void prune_idx(void)
Prune index according to x0.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
void operator++(void)
Move to next index value pair (next value)
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
IterIdxUnmark(IdxVal *iv)
Initialize with start.
bool operator()(void) const
Test whether more pairs to be iterated.
IdxViewArray(void)
Default constructor.
Idx val_next
The position of the next pair in value order.
Gecode toplevel namespace
#define GECODE_VTABLE_EXPORT
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Sorting pointers to (index,value) pairs in value order.
#define GECODE_INT_EXPORT
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
int ModEventDelta
Modification event deltas.
Element propagator for array of integers
Home class for posting propagators
static ExecStatus assigned_val(Space &home, IntSharedArray &c, V0 x0, V1 x1)
Prune when x1 is assigned.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Bounds consistent element propagator for array of views.
bool operator()(Idx &i, Idx &j)
Compare pairs at positions i and j.