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

Wait propagator for single view. More...

#include <wait.hpp>

Public Member Functions

virtual Actorcopy (Space &home)
 Perform copying during cloning.
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Const function (defined as low unary)
virtual void reschedule (Space &home)
 Schedule function.
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
virtual size_t dispose (Space &home)
 Delete propagator and return its size.
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, View x, std::function< void(Space &home)> c)
 Post propagator that waits until x becomes assigned and then executes c.
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

 UnaryWait (Home home, View x, std::function< void(Space &home)> c0)
 Constructor for creation.
 UnaryWait (Space &home, UnaryWait &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.

Protected Attributes

View x
 View to wait for becoming assigned.
SharedData< std::function< void(Space &home)> > c
 Continuation to execute.

Detailed Description

template<class View>
class Gecode::UnaryWait< View >

Wait propagator for single view.

Requires

#include <gecode/kernel/wait.hh>

Definition at line 43 of file wait.hpp.

Constructor & Destructor Documentation

◆ UnaryWait() [1/2]

template<class View>
Gecode::UnaryWait< View >::UnaryWait ( Home home,
View x,
std::function< void(Space &home)> c0 )
inlineprotected

Constructor for creation.

Definition at line 110 of file wait.hpp.

◆ UnaryWait() [2/2]

template<class View>
Gecode::UnaryWait< View >::UnaryWait ( Space & home,
UnaryWait< View > & p )
inlineprotected

Constructor for cloning p.

Definition at line 118 of file wait.hpp.

Member Function Documentation

◆ copy()

template<class View>
Actor * Gecode::UnaryWait< View >::copy ( Space & home)
virtual

Perform copying during cloning.

Implements Gecode::Actor.

Definition at line 124 of file wait.hpp.

◆ cost()

template<class View>
PropCost Gecode::UnaryWait< View >::cost ( const Space & home,
const ModEventDelta & med ) const
virtual

Const function (defined as low unary)

Implements Gecode::Propagator.

Definition at line 129 of file wait.hpp.

◆ reschedule()

template<class View>
void Gecode::UnaryWait< View >::reschedule ( Space & home)
virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 134 of file wait.hpp.

◆ propagate()

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 139 of file wait.hpp.

◆ post()

template<class View>
ExecStatus Gecode::UnaryWait< View >::post ( Home home,
View x,
std::function< void(Space &home)> c )
inlinestatic

Post propagator that waits until x becomes assigned and then executes c.

Definition at line 147 of file wait.hpp.

◆ dispose()

template<class View>
size_t Gecode::UnaryWait< View >::dispose ( Space & home)
virtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 161 of file wait.hpp.

Member Data Documentation

◆ x

template<class View>
View Gecode::UnaryWait< View >::x
protected

View to wait for becoming assigned.

Definition at line 46 of file wait.hpp.

◆ c

template<class View>
SharedData<std::function<void(Space& home)> > Gecode::UnaryWait< View >::c
protected

Continuation to execute.

Definition at line 48 of file wait.hpp.


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