Generated on for Gecode by doxygen 1.17.0

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

Public Member Functions

virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
virtual Actor * copy (Space &home)
 Create copy.
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 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 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)
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)
 Open (Space &home, Open &p)
void reserve_active (Space &home, int required)
 Grow geometrically and copy only active views.
template<class I>
ExecStatus exclude_values (Space &home, I excluded, int first, int *values, int &count)
 Exclude a batch from the selected suffix and collect all assignments.
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

View * active
 Variables whose assigned values have not yet been propagated.
int active_count
int active_capacity
GrowableIntSet assigned
 Assigned values to exclude from appended variables.
Protected Attributes inherited from Gecode::Int::OpenListPropagator< View >
OpenViewList< View > list
IntView length
int processed

Detailed Description

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

Definition at line 45 of file open.hpp.

Constructor & Destructor Documentation

◆ Open() [1/2]

template<class View>
Gecode::Int::Distinct::Open< View >::Open ( Home home,
OpenViewList< View > list )
inlineprotected

Definition at line 59 of file open.hpp.

◆ Open() [2/2]

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

Definition at line 65 of file open.hpp.

Member Function Documentation

◆ reserve_active()

template<class View>
void Gecode::Int::Distinct::Open< View >::reserve_active ( Space & home,
int required )
inlineprotected

Grow geometrically and copy only active views.

Definition at line 77 of file open.hpp.

◆ exclude_values()

template<class View>
template<class I>
ExecStatus Gecode::Int::Distinct::Open< View >::exclude_values ( Space & home,
I excluded,
int first,
int * values,
int & count )
inlineprotected

Exclude a batch from the selected suffix and collect all assignments.

Definition at line 100 of file open.hpp.

◆ cost()

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

Cost function.

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

Definition at line 118 of file open.hpp.

◆ copy()

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

Create copy.

Implements Gecode::Actor.

Definition at line 124 of file open.hpp.

◆ propagate()

template<class View>
virtual ExecStatus Gecode::Int::Distinct::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 129 of file open.hpp.

◆ reschedule()

template<class View>
virtual void Gecode::Int::Distinct::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 177 of file open.hpp.

◆ dispose()

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

Delete actor and return its size.

Reimplemented from Gecode::Actor.

Definition at line 185 of file open.hpp.

◆ post()

template<class View>
void Gecode::Int::Distinct::Open< View >::post ( Home home,
OpenViewList< View > list )
inlinestatic

Definition at line 198 of file open.hpp.

Member Data Documentation

◆ active

template<class View>
View* Gecode::Int::Distinct::Open< View >::active
protected

Variables whose assigned values have not yet been propagated.

Definition at line 53 of file open.hpp.

◆ active_count

template<class View>
int Gecode::Int::Distinct::Open< View >::active_count
protected

Definition at line 54 of file open.hpp.

◆ active_capacity

template<class View>
int Gecode::Int::Distinct::Open< View >::active_capacity
protected

Definition at line 55 of file open.hpp.

◆ assigned

template<class View>
GrowableIntSet Gecode::Int::Distinct::Open< View >::assigned
protected

Assigned values to exclude from appended variables.

Definition at line 57 of file open.hpp.


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