Generated on for Gecode by doxygen 1.17.0

#include <gecode/int/precede/open.hpp>

Classes

class  Index
 Keep the view as well as its position for independent disposal. More...

Public Member Functions

virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
virtual Actor * copy (Space &home)
 Create copy.
virtual ExecStatus advise (Space &home, Advisor &a0, const Delta &)
 Advise function.
virtual ExecStatus propagate (Space &home, const ModEventDelta &)
 Propagation function.
virtual void reschedule (Space &home)
 Schedule function.
virtual size_t dispose (Space &home)
 Delete actor and return its size.
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 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 void post (Home home, OpenViewList< View > list, int before, int after)
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

 Open (Home home, OpenViewList< View > list, int before0, int after0)
 Open (Space &home, Open &p)
Protected Member Functions inherited from Gecode::Int::OpenListPropagator< View >
 OpenListPropagator (Home home, OpenViewList< View > list0)
 OpenListPropagator (Space &home, OpenListPropagator &p)
bool closed (void) const
void dispose_base (Space &home)
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

Council< Index > council
int before
int after
int alpha
 First and second positions that can still take before.
int beta
int gamma
 First position assigned after, or infinity while none is known.
Protected Attributes inherited from Gecode::Int::OpenListPropagator< View >
OpenViewList< View > list
IntView length
int processed

Detailed Description

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

Definition at line 43 of file open.hpp.

Constructor & Destructor Documentation

◆ Open() [1/2]

template<class View>
Gecode::Int::Precede::Open< View >::Open ( Home home,
OpenViewList< View > list,
int before0,
int after0 )
inlineprotected

Definition at line 75 of file open.hpp.

◆ Open() [2/2]

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

Definition at line 81 of file open.hpp.

Member Function Documentation

◆ cost()

template<class View>
virtual PropCost Gecode::Int::Precede::Open< View >::cost ( const Space & home,
const ModEventDelta & med ) const
inlinevirtual

Cost function.

Reimplemented from Gecode::Int::OpenListPropagator< View >.

Definition at line 90 of file open.hpp.

◆ copy()

template<class View>
virtual Actor * Gecode::Int::Precede::Open< View >::copy ( Space & home)
inlinevirtual

Create copy.

Implements Gecode::Actor.

Definition at line 95 of file open.hpp.

◆ advise()

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

Advise function.

The advisor is passed as argument a.

A propagator must specialize this advise function, if it uses advisors. The advise function must return an execution status as follows:

  • ES_FAILED: the advisor has detected failure.
  • ES_FIX: the advisor's propagator (that is, this propagator) does not need to be run.
  • ES_NOFIX: the advisor's propagator (that is, this propagator) must be run.
  • ES_NOFIX_FORCE: the advisor's propagator (that is, this propagator) must be run and it must forcefully be rescheduled (including recomputation of cost).

Apart from the above values, an advisor can return the result from calling the function defined by a space:

  • ES_FIX_DISPOSE: the advisor's propagator does not need to be run and the advisor will be disposed.
  • ES_NOFIX_DISPOSE: the advisor's propagator must be run and the advisor will be disposed.
  • ES_NOFIX_FORCE_DISPOSE: the advisor's propagator must be run , it must forcefully be rescheduled (including recomputation of cost), and the adviser will be disposed. For more details, see the function documentation.

The delta d describes how the variable has been changed by an operation on the advisor's variable. Typically, the delta information can only be utilized by either static or member functions of views as the actual delta information is both domain and view dependent.

Reimplemented from Gecode::Propagator.

Definition at line 100 of file open.hpp.

◆ propagate()

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

Propagation function.

The propagation function must return an execution status as follows:

  • ES_FAILED: the propagator has detected failure
  • ES_NOFIX: the propagator has done propagation
  • ES_FIX: the propagator has done propagation and has computed a fixpoint. That is, running the propagator immediately again will do nothing.

Apart from the above values, a propagator can return the result from calling one of the functions defined by a space:

  • ES_SUBSUMED: the propagator is subsumed and has been already deleted.
  • ES_NOFIX_PARTIAL: the propagator has consumed some of its propagation events.
  • ES_FIX_PARTIAL: the propagator has consumed some of its propagation events and with respect to these events is at fixpoint For more details, see the individual functions.

Implements Gecode::Propagator.

Definition at line 121 of file open.hpp.

◆ reschedule()

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

Schedule function.

The function is executed when a propagator is enabled again. Note that a propagator should be scheduled with the right modification event delta and should only be scheduled if it is legal to execute the propagator.

Reimplemented from Gecode::Int::OpenListPropagator< View >.

Definition at line 166 of file open.hpp.

◆ dispose()

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

Delete actor and return its size.

Reimplemented from Gecode::Actor.

Definition at line 172 of file open.hpp.

◆ post()

template<class View>
void Gecode::Int::Precede::Open< View >::post ( Home home,
OpenViewList< View > list,
int before,
int after )
inlinestatic

Definition at line 181 of file open.hpp.

Member Data Documentation

◆ council

template<class View>
Council<Index> Gecode::Int::Precede::Open< View >::council
protected

Definition at line 66 of file open.hpp.

◆ before

template<class View>
int Gecode::Int::Precede::Open< View >::before
protected

Definition at line 67 of file open.hpp.

◆ after

template<class View>
int Gecode::Int::Precede::Open< View >::after
protected

Definition at line 68 of file open.hpp.

◆ alpha

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

First and second positions that can still take before.

Definition at line 70 of file open.hpp.

◆ beta

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

Definition at line 71 of file open.hpp.

◆ gamma

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

First position assigned after, or infinity while none is known.

Definition at line 73 of file open.hpp.


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