product-mod.hpp
Go to the documentation of this file.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Definition core.hpp:3373
static ExecStatus post(Home home, ViewArray< IntView > &x, IntView m, IntView y)
Post propagator.
Definition product-mod.hpp:580
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition product-mod.hpp:620
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition product-mod.hpp:632
ProductModVar(Home home, ViewArray< IntView > &x, IntView m, IntView y)
Constructor for posting.
Definition product-mod.hpp:570
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition product-mod.hpp:699
ProductMod(Home home, ViewArray< IntView > &x, int m, IntView y, int c, int a)
Constructor for posting.
Definition product-mod.hpp:218
static ExecStatus post(Home home, ViewArray< IntView > &x, int m, IntView y)
Post propagator.
Definition product-mod.hpp:224
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition product-mod.hpp:262
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition product-mod.hpp:257
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition product-mod.hpp:268
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition product-mod.hpp:766
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition product-mod.hpp:799
static ExecStatus post(Home home, ViewArray< IntView > &x, IntView m, IntView y, BoolView b)
Post propagator.
Definition product-mod.hpp:722
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition product-mod.hpp:751
ReProductModVar(Home home, ViewArray< IntView > &x, IntView m, IntView y, BoolView b)
Constructor for posting.
Definition product-mod.hpp:710
static ExecStatus post(Home home, ViewArray< IntView > &x, int m, IntView y, BoolView b)
Post propagator.
Definition product-mod.hpp:822
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition product-mod.hpp:874
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition product-mod.hpp:905
ReProductMod(Home home, ViewArray< IntView > &x, int m, IntView y, BoolView b)
Constructor for posting.
Definition product-mod.hpp:811
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition product-mod.hpp:860
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition int.hpp:121
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition int.hpp:139
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post domain consistent propagator .
Definition eq.hpp:644
NaryOnePropagator(Space &home, NaryOnePropagator &p)
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Definition core.hpp:5080
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
Definition region.hpp:386
void update(Space &home, VarImpView< Var > &y)
Update this view to be a clone of view y.
Definition view.hpp:567
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Definition view.hpp:527
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
Definition view.hpp:532
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
Definition view.hpp:521
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
Definition array.hpp:1337
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
Definition array.hpp:1379
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to all views.
Definition array.hpp:1358
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one).
Definition array.hpp:1245
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
Definition array.hpp:1350
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Definition core.hpp:4321
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Definition macros.hpp:52
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
Definition macros.hpp:116
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Definition macros.hpp:91
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Definition modevent.hpp:59
Numerical (arithmetic) propagators.
long long int product_mod_inverse(long long int a, long long int m)
Extended Euclid for a modular inverse (arguments are coprime).
Definition product-mod.hpp:179
ProductInterval product_mod_congruence(ProductInterval x, int c, int m, int y)
Extreme solutions to c*x = y modulo m, or an empty interval.
Definition product-mod.hpp:195
RelTest product_mod_var_status(const ViewArray< IntView > &x, const IntView &m, const IntView &y)
Determine algebraic status; evaluate the residue only when fully assigned.
Definition product-mod.hpp:526
int product_mod_coefficient(const ViewArray< IntView > &x, int m, int &free_count)
Reduce assigned factors and count the remaining factor occurrences.
Definition product-mod.hpp:90
bool product_mod_interval(const ViewArray< IntView > &x, ProductInterval &p, int a=1)
Return exact representable product bounds, or false on overflow.
Definition product-mod.hpp:57
void product_mod_fold(ViewArray< IntView > &x, int m, int &c, int &a)
Fold assigned occurrences into modular and representable exact coefficients.
Definition product-mod.hpp:108
bool product_mod_intervals(const ViewArray< IntView > &x, ProductInterval *prefix, ProductInterval *suffix, int a=1)
Build all cofactor bounds in linear time, without modular saturation.
Definition product-mod.hpp:70
ExecStatus product_mod_var_ranges(Home home, ViewArray< IntView > &x, IntView m, IntView y)
Propagate a nonnegative representable product with a variable modulus.
Definition product-mod.hpp:430
ExecStatus multiple_bounds(Home home, IntView x, int d)
Tighten a view to the extreme multiples of a positive divisor.
Definition gcd.hpp:73
bool product_mod_var_exact(const ViewArray< IntView > &x, long long int &p)
Compute the exact assigned product when it fits in a signed 64-bit value.
Definition product-mod.hpp:376
ProductWideInterval product_quotient_bounds(long long int ymin, long long int ymax, int qmin, int qmax)
Quotient bounds for a zero-free divisor, before clipping the endpoints.
Definition product.hpp:135
bool product_mod_var_mod_factor(const ViewArray< IntView > &x, const IntView &m)
Whether the modulus occurs among the factors.
Definition product-mod.hpp:367
bool product_mod_interval_mul(ProductInterval a, ProductInterval b, ProductInterval &p)
Multiply intervals exactly; saturation would make modular deductions unsound.
Definition product-mod.hpp:39
ExecStatus product_mod_nonzero(Space &home, ViewArray< IntView > &x, bool &modified)
A nonzero residue excludes bounds-visible zero factors.
Definition product-mod.hpp:131
void product_mod_units(ViewArray< IntView > &x)
Drop assigned units without changing a product with an unknown modulus.
Definition product-mod.hpp:123
RelTest product_mod_status(const ViewArray< IntView > &x, const IntView &y, int m)
Determine the fixed-modulus relation algebraically.
Definition product-mod.hpp:146
bool product_mod_var_divisor_bounds(int lower, int upper, long long int d, int &least, int &greatest)
Tighten divisor bounds for a nonzero difference without enumeration.
Definition product-mod.hpp:392
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
Definition limits.hpp:107
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Definition limits.hpp:93
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:99
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value).
Definition var-type.hpp:134
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
Definition var-type.hpp:62
Gecode toplevel namespace
A representable, conservative interval for an exact product.
Definition product.hpp:38
An interval whose endpoints have not been restricted to integer limits.
Definition product.hpp:128
