Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0

Membership propagator. More...

#include <member.hh>

Public Member Functions

virtual PropCost cost (const Space &, const ModEventDelta &med) const
 Cost function.
virtual Propagatorcopy (Space &home)
 Copy propagator during cloning.
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< View, PC_INT_DOM >
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 accumlated 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< View > &x, View y)
 Post propagator for $y\in \{x_0,\ldots,x_{|x|-1}\}$.
static ExecStatus post (Home home, ValSet &vs, ViewArray< View > &x, View y)
 Post propagator for $y\in vs\cup \{x_0,\ldots,x_{|x|-1}\}$.
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

void eliminate (Space &home)
 Eliminate views from x that are not equal to y or ar subsumed by vs.
 Prop (Home home, ValSet &vs, ViewArray< View > &x, View y)
 Constructor for posting.
 Prop (Space &home, Prop< View > &p)
 Constructor for cloning p.
Protected Member Functions inherited from Gecode::NaryOnePropagator< View, PC_INT_DOM >
 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.
Propagatorfwd (void) const
 Return forwarding pointer during copying.
Kernel::GPI::Infogpi (void)
 Provide access to global propagator information.

Static Protected Member Functions

static void add (Space &home, ValSet &vs, ViewArray< View > &x)
 Add values of assigned views in x to value set va.

Protected Attributes

ValSet vs
 Value set storing the values of already assigned views.
Protected Attributes inherited from Gecode::NaryOnePropagator< View, PC_INT_DOM >
ViewArray< Viewx
 Array of views.
View y
 Single view.

Detailed Description

template<class View>
class Gecode::Int::Member::Prop< View >

Membership propagator.

Requires

Definition at line 54 of file member.hh.

Constructor & Destructor Documentation

◆ Prop() [1/2]

template<class View>
Gecode::Int::Member::Prop< View >::Prop ( Home home,
ValSet & vs,
ViewArray< View > & x,
View y )
inlineprotected

Constructor for posting.

Definition at line 40 of file prop.hpp.

◆ Prop() [2/2]

template<class View>
Gecode::Int::Member::Prop< View >::Prop ( Space & home,
Prop< View > & p )
inlineprotected

Constructor for cloning p.

Definition at line 106 of file prop.hpp.

Member Function Documentation

◆ add()

template<class View>
void Gecode::Int::Member::Prop< View >::add ( Space & home,
ValSet & vs,
ViewArray< View > & x )
inlinestaticprotected

Add values of assigned views in x to value set va.

Definition at line 46 of file prop.hpp.

◆ eliminate()

template<class View>
void Gecode::Int::Member::Prop< View >::eliminate ( Space & home)
inlineprotected

Eliminate views from x that are not equal to y or ar subsumed by vs.

Definition at line 58 of file prop.hpp.

◆ cost()

template<class View>
PropCost Gecode::Int::Member::Prop< View >::cost ( const Space & ,
const ModEventDelta & med ) const
virtual

Cost function.

Reimplemented from Gecode::NaryOnePropagator< View, PC_INT_DOM >.

Definition at line 127 of file prop.hpp.

◆ copy()

template<class View>
Propagator * Gecode::Int::Member::Prop< View >::copy ( Space & home)
virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Reimplemented in Gecode::Int::Member::ReProp< View, rm >.

Definition at line 113 of file prop.hpp.

◆ propagate()

template<class View>
ExecStatus Gecode::Int::Member::Prop< View >::propagate ( Space & home,
const ModEventDelta & med )
virtual

Perform propagation.

Implements Gecode::Propagator.

Reimplemented in Gecode::Int::Member::ReProp< View, rm >.

Definition at line 133 of file prop.hpp.

◆ post() [1/2]

template<class View>
ExecStatus Gecode::Int::Member::Prop< View >::post ( Home home,
ViewArray< View > & x,
View y )
inlinestatic

Post propagator for $y\in \{x_0,\ldots,x_{|x|-1}\}$.

Definition at line 71 of file prop.hpp.

◆ post() [2/2]

template<class View>
ExecStatus Gecode::Int::Member::Prop< View >::post ( Home home,
ValSet & vs,
ViewArray< View > & x,
View y )
inlinestatic

Post propagator for $y\in vs\cup \{x_0,\ldots,x_{|x|-1}\}$.

Definition at line 99 of file prop.hpp.

◆ dispose()

template<class View>
size_t Gecode::Int::Member::Prop< View >::dispose ( Space & home)
inlinevirtual

Delete propagator and return its size.

Reimplemented from Gecode::NaryOnePropagator< View, PC_INT_DOM >.

Reimplemented in Gecode::Int::Member::ReProp< View, rm >.

Definition at line 119 of file prop.hpp.

Member Data Documentation

◆ vs

template<class View>
ValSet Gecode::Int::Member::Prop< View >::vs
protected

Value set storing the values of already assigned views.

Definition at line 59 of file member.hh.


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