Generated on for Gecode by doxygen 1.15.0
Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm > Class Template Reference

Public Member Functions

 SparseReifInc (Home home, ViewArray< View > &x0, const TupleSet &ts0, CtrlView b0)
 SparseReifInc (Space &home, SparseReifInc< View, CtrlView, rm > &p)
virtual Actorcopy (Space &home)
 Create copy.
virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
virtual void reschedule (Space &home)
 Schedule function.
virtual size_t dispose (Space &home)
 Delete actor and return its size.
virtual ExecStatus propagate (Space &home, const ModEventDelta &)
 Propagation function.
virtual ExecStatus advise (Space &home, Advisor &a0, const Delta &d)
 Advise function.
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 ExecStatus post_pos (Home home, ViewArray< View > &x, const TupleSet &ts)
static ExecStatus post_neg (Home home, ViewArray< View > &x, const TupleSet &ts)
static ExecStatus post (Home home, ViewArray< View > &x, const TupleSet &ts, CtrlView b)
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 Types

typedef Extensional::SparseAdvisor< ViewSparseAdvisor
typedef SparseTupleState< SparseReifInc< View, CtrlView, rm >, ViewState

Protected Member Functions

void deactivate_tuple (unsigned int tid)
bool support_active (unsigned int) const
void deactivate_for_all_domains (const ViewArray< View > &x)
void deactivate_for_domain (int variable, const View &view)
void deactivate_removed_values (int variable, const View &view, const Delta &delta)
bool remove_tuple (unsigned int tid)
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 Member Functions inherited from Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >
SparseReifInc< View, CtrlView, rm > & derived (void)
const unsigned int * tuple_gids (unsigned int tid) const
unsigned int tuple_gid (unsigned int tid, int variable) const
bool remove_tuple (unsigned int tid)
void deactivate_value_support (int variable, int value)
void deactivate_for_domain (int variable, const View &view)
void deactivate_removed_values (int variable, const View &view, const Delta &delta)
void deactivate_for_all_domains (const ViewArray< View > &x)
 SparseTupleState (Home home, ViewArray< View > &x, const TupleSet &ts0)
 SparseTupleState (Space &home, const SparseTupleState &state)

Protected Attributes

ViewArray< Viewx
CtrlView b
Council< SparseAdvisorc
unsigned int active_limit
int arity
unsigned int n_tuples
TupleSet ts
Protected Attributes inherited from Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >
TupleSet ts
int arity
unsigned int n_tuples
unsigned int n_vals
unsigned int * active_ids
unsigned int * pos_in_active
unsigned int active_limit
int * gid_val
const unsigned int * tv

Detailed Description

template<class View, class CtrlView, ReifyMode rm>
class Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >

Definition at line 726 of file extensional-tuple-set.cpp.

Member Typedef Documentation

◆ SparseAdvisor

template<class View, class CtrlView, ReifyMode rm>
typedef Extensional::SparseAdvisor<View> Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::SparseAdvisor
protected

Definition at line 730 of file extensional-tuple-set.cpp.

◆ State

template<class View, class CtrlView, ReifyMode rm>
typedef SparseTupleState<SparseReifInc<View,CtrlView,rm>,View> Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::State
protected

Definition at line 731 of file extensional-tuple-set.cpp.

Constructor & Destructor Documentation

◆ SparseReifInc() [1/2]

template<class View, class CtrlView, ReifyMode rm>
Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::SparseReifInc ( Home home,
ViewArray< View > & x0,
const TupleSet & ts0,
CtrlView b0 )
inline

Definition at line 767 of file extensional-tuple-set.cpp.

◆ SparseReifInc() [2/2]

template<class View, class CtrlView, ReifyMode rm>
Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::SparseReifInc ( Space & home,
SparseReifInc< View, CtrlView, rm > & p )
inline

Definition at line 779 of file extensional-tuple-set.cpp.

Member Function Documentation

◆ deactivate_tuple()

template<class View, class CtrlView, ReifyMode rm>
void Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::deactivate_tuple ( unsigned int tid)
inlineprotected

Definition at line 747 of file extensional-tuple-set.cpp.

◆ support_active()

template<class View, class CtrlView, ReifyMode rm>
bool Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::support_active ( unsigned int ) const
inlineprotected

Definition at line 752 of file extensional-tuple-set.cpp.

◆ post_pos()

template<class View, class CtrlView, ReifyMode rm>
ExecStatus Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::post_pos ( Home home,
ViewArray< View > & x,
const TupleSet & ts )
inlinestatic

Definition at line 758 of file extensional-tuple-set.cpp.

◆ post_neg()

template<class View, class CtrlView, ReifyMode rm>
ExecStatus Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::post_neg ( Home home,
ViewArray< View > & x,
const TupleSet & ts )
inlinestatic

Definition at line 763 of file extensional-tuple-set.cpp.

◆ post()

template<class View, class CtrlView, ReifyMode rm>
ExecStatus Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::post ( Home home,
ViewArray< View > & x,
const TupleSet & ts,
CtrlView b )
inlinestatic

Definition at line 787 of file extensional-tuple-set.cpp.

◆ copy()

template<class View, class CtrlView, ReifyMode rm>
virtual Actor * Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::copy ( Space & home)
inlinevirtual

Create copy.

Implements Gecode::Actor.

Definition at line 805 of file extensional-tuple-set.cpp.

◆ cost()

template<class View, class CtrlView, ReifyMode rm>
virtual PropCost Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::cost ( const Space & home,
const ModEventDelta & med ) const
inlinevirtual

Cost function.

Implements Gecode::Propagator.

Definition at line 810 of file extensional-tuple-set.cpp.

◆ reschedule()

template<class View, class CtrlView, ReifyMode rm>
virtual void Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::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.

Implements Gecode::Propagator.

Definition at line 815 of file extensional-tuple-set.cpp.

◆ dispose()

template<class View, class CtrlView, ReifyMode rm>
virtual size_t Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::dispose ( Space & home)
inlinevirtual

Delete actor and return its size.

Reimplemented from Gecode::Actor.

Definition at line 820 of file extensional-tuple-set.cpp.

◆ propagate()

template<class View, class CtrlView, ReifyMode rm>
virtual ExecStatus Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::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 830 of file extensional-tuple-set.cpp.

◆ advise()

template<class View, class CtrlView, ReifyMode rm>
virtual ExecStatus Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::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 862 of file extensional-tuple-set.cpp.

◆ deactivate_for_all_domains()

template<class View, class CtrlView, ReifyMode rm>
void Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::deactivate_for_all_domains ( const ViewArray< View > & x)
inlineprotected

Definition at line 250 of file extensional-tuple-set.cpp.

◆ deactivate_for_domain()

template<class View, class CtrlView, ReifyMode rm>
void Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::deactivate_for_domain ( int variable,
const View & view )
inlineprotected

Definition at line 212 of file extensional-tuple-set.cpp.

◆ deactivate_removed_values()

template<class View, class CtrlView, ReifyMode rm>
void Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::deactivate_removed_values ( int variable,
const View & view,
const Delta & delta )
inlineprotected

Definition at line 225 of file extensional-tuple-set.cpp.

◆ remove_tuple()

template<class View, class CtrlView, ReifyMode rm>
bool Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::remove_tuple ( unsigned int tid)
inlineprotected

Definition at line 184 of file extensional-tuple-set.cpp.

Member Data Documentation

◆ x

template<class View, class CtrlView, ReifyMode rm>
ViewArray<View> Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::x
protected

Definition at line 742 of file extensional-tuple-set.cpp.

◆ b

template<class View, class CtrlView, ReifyMode rm>
CtrlView Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::b
protected

Definition at line 743 of file extensional-tuple-set.cpp.

◆ c

template<class View, class CtrlView, ReifyMode rm>
Council<SparseAdvisor> Gecode::Int::Extensional::SparseReifInc< View, CtrlView, rm >::c
protected

Definition at line 744 of file extensional-tuple-set.cpp.

◆ active_limit

template<class View, class CtrlView, ReifyMode rm>
unsigned int Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::active_limit
protected

Definition at line 159 of file extensional-tuple-set.cpp.

◆ arity

template<class View, class CtrlView, ReifyMode rm>
int Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::arity
protected

Definition at line 154 of file extensional-tuple-set.cpp.

◆ n_tuples

template<class View, class CtrlView, ReifyMode rm>
unsigned int Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::n_tuples
protected

Definition at line 155 of file extensional-tuple-set.cpp.

◆ ts

template<class View, class CtrlView, ReifyMode rm>
TupleSet Gecode::Int::Extensional::SparseTupleState< SparseReifInc< View, CtrlView, rm >, View >::ts
protected

Definition at line 153 of file extensional-tuple-set.cpp.


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