40 #ifndef __GECODE_INT_ELEMENT_HH__
41 #define __GECODE_INT_ELEMENT_HH__
52 namespace Gecode {
namespace Int {
namespace Element {
60 template<
class V0,
class V1,
class Idx,
class Val>
196 template<
class V0,
class V1>
204 template<
class VA,
class VB,
class VC, PropCond pc_ac>
231 template<
class VA,
class VB,
class VC>
261 template<
class VA,
class VB,
class VC>
Domain consistent element propagator for array of views.
IdxVal * iv
The index-value data structure.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
Idx val(void) const
Return index of current index value pair.
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.
void operator++(void)
Move to next index value pair (next value)
IterValUnmark(IdxVal *iv)
Initialize with start.
Val val(void) const
Return value of current index value pair.
Int(Space &home, bool shared, Int &p)
Constructor for cloning p.
IterVal(IdxVal *iv)
Initialize with start.
const IdxVal * iv
Index-value pairs.
Base-class for propagators.
static ExecStatus post(Home home, IdxViewArray< VA > &iv, VB x0, VC x1)
Post propagator for .
bool operator()(void) const
Test whether more pairs to be iterated.
ValSize s1
Size of x1 at last execution.
Val val(void) const
Return value of current index value pair.
Value iterator for indices in index-value map.
IntSharedArray c
Shared array of integer values.
Base-class for both propagators and branchers.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
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)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as high binary)
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.
bool operator()(void) const
Test whether more pairs to be iterated.
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.
bool operator()(void) const
Test whether more pairs to be iterated.
Integer view for integer variables.
Domain consistent pair propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
ViewBnd(Space &home, bool share, ViewBnd &p)
Constructor for cloning p.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
ViewDom(Space &home, bool share, ViewDom &p)
Constructor for cloning p.
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.
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.
Idx val_next
The position of the next pair in value order.
bool marked(void) const
Return whether this pair is marked for removal.
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
int ModEventDelta
Modification event deltas.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
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.