Generated on for Gecode by doxygen 1.17.0

Bounds propagator for a fixed-modulus n-ary product. More...

#include <gecode/int/arithmetic.hh>

Public Member Functions

virtual Actor * copy (Space &home)
 Copy propagator during cloning.
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function.
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
virtual size_t dispose (Space &home)
 Delete propagator and return its size.
Public Member Functions inherited from Gecode::NaryOnePropagator< IntView, PC_INT_BND >
virtual void reschedule (Space &home)
 Schedule function.
ModEventDelta modeventdelta (void) const
 Return the modification event delta.
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Advise function.
virtual void advise (Space &home, Advisor &a)
 Run advisor a to be run on failure in failed space.
double afc (void) const
 Return the accumulated failure count.
unsigned int id (void) const
 Return propagator id.
PropagatorGroup group (void) const
 Return group propagator belongs to.
void group (PropagatorGroup g)
 Add propagator to group g.
bool disabled (void) const
 Whether propagator is currently disabled.
virtual ~Actor (void)
 To avoid warnings.

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< IntView > &x, int m, IntView y)
 Post propagator.
static void * operator new (size_t s, Space &home)
 Allocate memory from space.
static void operator delete (void *p, Space &home)
 No-op for exceptions.
static void * operator new (size_t s)
 Not used.
static void operator delete (void *p)
 Not used.

Protected Member Functions

 ProductMod (Home home, ViewArray< IntView > &x, int m, IntView y, int c, int a)
 Constructor for posting.
 ProductMod (Space &home, ProductMod &p)
 Constructor for cloning p.
Protected Member Functions inherited from Gecode::NaryOnePropagator< IntView, PC_INT_BND >
 NaryOnePropagator (Space &home, NaryOnePropagator &p)
 Constructor for cloning p.
Protected Member Functions inherited from Gecode::Propagator
 Propagator (Home home)
 Constructor for posting.
 Propagator (Space &home, Propagator &p)
 Constructor for cloning p.
Propagator * fwd (void) const
 Return forwarding pointer during copying.
Kernel::GPI::Info & gpi (void)
 Provide access to propagator information.

Protected Attributes

int m
 Positive modulus.
int c
 Canonical residue of removed factors.
int a
 Exact product of removed factors, or zero when not representable.
Protected Attributes inherited from Gecode::NaryOnePropagator< IntView, PC_INT_BND >
ViewArray< IntView > x
 Array of views.
IntView y
 Single view.

Detailed Description

Bounds propagator for a fixed-modulus n-ary product.

Requires

Definition at line 948 of file arithmetic.hh.

Constructor & Destructor Documentation

◆ ProductMod() [1/2]

Gecode::Int::Arithmetic::ProductMod::ProductMod ( Home home,
ViewArray< IntView > & x,
int m,
IntView y,
int c,
int a )
inlineprotected

Constructor for posting.

Definition at line 218 of file product-mod.hpp.

◆ ProductMod() [2/2]

Gecode::Int::Arithmetic::ProductMod::ProductMod ( Space & home,
ProductMod & p )
inlineprotected

Constructor for cloning p.

Definition at line 247 of file product-mod.hpp.

Member Function Documentation

◆ post()

ExecStatus Gecode::Int::Arithmetic::ProductMod::post ( Home home,
ViewArray< IntView > & x,
int m,
IntView y )
inlinestatic

Post propagator.

Definition at line 224 of file product-mod.hpp.

◆ copy()

Actor * Gecode::Int::Arithmetic::ProductMod::copy ( Space & home)
inlinevirtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 252 of file product-mod.hpp.

◆ cost()

PropCost Gecode::Int::Arithmetic::ProductMod::cost ( const Space & home,
const ModEventDelta & med ) const
inlinevirtual

Cost function.

Reimplemented from Gecode::NaryOnePropagator< IntView, PC_INT_BND >.

Definition at line 257 of file product-mod.hpp.

◆ propagate()

ExecStatus Gecode::Int::Arithmetic::ProductMod::propagate ( Space & home,
const ModEventDelta & med )
inlinevirtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 268 of file product-mod.hpp.

◆ dispose()

size_t Gecode::Int::Arithmetic::ProductMod::dispose ( Space & home)
inlinevirtual

Delete propagator and return its size.

Reimplemented from Gecode::NaryOnePropagator< IntView, PC_INT_BND >.

Definition at line 262 of file product-mod.hpp.

Member Data Documentation

◆ m

int Gecode::Int::Arithmetic::ProductMod::m
protected

Positive modulus.

Definition at line 953 of file arithmetic.hh.

◆ c

int Gecode::Int::Arithmetic::ProductMod::c
protected

Canonical residue of removed factors.

Definition at line 955 of file arithmetic.hh.

◆ a

int Gecode::Int::Arithmetic::ProductMod::a
protected

Exact product of removed factors, or zero when not representable.

Definition at line 957 of file arithmetic.hh.


The documentation for this class was generated from the following files: