Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Single value precedence propagator. More...

#include <precede.hh>

Classes

class  Index
 Advisors for views (by position in array) More...
 

Public Member Functions

virtual Propagatorcopy (Space &home)
 Copy propagator during cloning.
 
virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
 
virtual void reschedule (Space &home)
 Schedule function.
 
virtual size_t dispose (Space &home)
 Delete propagator and return its size.
 
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Give advice to propagator.
 
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
 
- Public Member Functions inherited from Gecode::NaryPropagator< View, PC_INT_NONE >
- Public Member Functions inherited from Gecode::Propagator
ModEventDelta modeventdelta (void) const
 Return the modification event delta.
 
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.
 
- Public Member Functions inherited from Gecode::Actor
virtual ~Actor (void)
 To avoid warnings.
 

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< View > &x, int s, int t)
 Post propagator that s precedes t in x.
 
- Static Public Member Functions inherited from Gecode::Actor
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

ExecStatus updateAlpha (Space &home)
 Update the alpha pointer.
 
ExecStatus updateBeta (Space &home)
 Update the beta pointer.
 
 Single (Home home, ViewArray< View > &x, int s, int t, int beta, int gamma)
 Constructor for posting.
 
 Single (Space &home, Single< View > &p)
 Constructor for cloning p.
 
- Protected Member Functions inherited from Gecode::NaryPropagator< View, PC_INT_NONE >
 NaryPropagator (Space &home, NaryPropagator &p)
 Constructor for cloning p.
 
 NaryPropagator (Space &home, Propagator &p, ViewArray< View > &x)
 Constructor for rewriting p during cloning.
 
 NaryPropagator (Home home, ViewArray< View > &x)
 Constructor for creation.
 
- 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.
 

Protected Attributes

Council< Indexc
 The advisor council.
 
int s
 The value s must precede t.
 
int t
 
int alpha
 Pointers updated during propagation.
 
int beta
 
int gamma
 
- Protected Attributes inherited from Gecode::NaryPropagator< View, PC_INT_NONE >
ViewArray< View > x
 Array of views.
 

Detailed Description

template<class View>
class Gecode::Int::Precede::Single< View >

Single value precedence propagator.

The propagator is based on: Yat Chiu Law and Jimmy H.M. Lee, Global Constraints for Integer and Set Value Precedence, CP 2004, 362–376.

Requires

Definition at line 61 of file precede.hh.

Constructor & Destructor Documentation

◆ Single() [1/2]

template<class View >
Gecode::Int::Precede::Single< View >::Single ( Home home,
ViewArray< View > & x,
int s,
int t,
int beta,
int gamma )
inlineprotected

Constructor for posting.

Definition at line 84 of file single.hpp.

◆ Single() [2/2]

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

Constructor for cloning p.

Definition at line 128 of file single.hpp.

Member Function Documentation

◆ updateAlpha()

template<class View >
ExecStatus Gecode::Int::Precede::Single< View >::updateAlpha ( Space & home)
inlineprotected

Update the alpha pointer.

Definition at line 61 of file single.hpp.

◆ updateBeta()

template<class View >
ExecStatus Gecode::Int::Precede::Single< View >::updateBeta ( Space & home)
inlineprotected

Update the beta pointer.

Definition at line 72 of file single.hpp.

◆ copy()

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

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 136 of file single.hpp.

◆ cost()

template<class View >
PropCost Gecode::Int::Precede::Single< View >::cost ( const Space & ,
const ModEventDelta &  ) const
virtual

Cost function.

Reimplemented from Gecode::NaryPropagator< View, PC_INT_NONE >.

Definition at line 171 of file single.hpp.

◆ reschedule()

template<class View >
void Gecode::Int::Precede::Single< View >::reschedule ( Space & home)
virtual

Schedule function.

Reimplemented from Gecode::NaryPropagator< View, PC_INT_NONE >.

Definition at line 177 of file single.hpp.

◆ dispose()

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

Delete propagator and return its size.

Reimplemented from Gecode::NaryPropagator< View, PC_INT_NONE >.

Definition at line 160 of file single.hpp.

◆ advise()

template<class View >
ExecStatus Gecode::Int::Precede::Single< View >::advise ( Space & home,
Advisor & a,
const Delta & d )
virtual

Give advice to propagator.

Reimplemented from Gecode::Propagator.

Definition at line 183 of file single.hpp.

◆ propagate()

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 211 of file single.hpp.

◆ post()

template<class View >
ExecStatus Gecode::Int::Precede::Single< View >::post ( Home home,
ViewArray< View > & x,
int s,
int t )
inlinestatic

Post propagator that s precedes t in x.

Definition at line 96 of file single.hpp.

Member Data Documentation

◆ c

template<class View >
Council<Index> Gecode::Int::Precede::Single< View >::c
protected

The advisor council.

Definition at line 75 of file precede.hh.

◆ s

template<class View >
int Gecode::Int::Precede::Single< View >::s
protected

The value s must precede t.

Definition at line 77 of file precede.hh.

◆ t

template<class View >
int Gecode::Int::Precede::Single< View >::t
protected

Definition at line 77 of file precede.hh.

◆ alpha

template<class View >
int Gecode::Int::Precede::Single< View >::alpha
protected

Pointers updated during propagation.

Definition at line 79 of file precede.hh.

◆ beta

template<class View >
int Gecode::Int::Precede::Single< View >::beta
protected

Definition at line 79 of file precede.hh.

◆ gamma

template<class View >
int Gecode::Int::Precede::Single< View >::gamma
protected

Definition at line 79 of file precede.hh.


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