Generated on for Gecode by doxygen 1.17.0

Equal sums via the first complete window and periodic equalities. More...

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

Public Member Functions

virtual Actor * copy (Space &home)
 Create copy.
virtual ExecStatus propagate (Space &home, const ModEventDelta &)
 Propagation function.
virtual size_t dispose (Space &home)
 Delete actor and return its size.
Public Member Functions inherited from Gecode::Int::OpenListPropagator< View >
virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
virtual void reschedule (Space &home)
 Schedule function.
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, int width, int sum, IntPropLevel ipl)
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

 OpenSlidingSumEq (Home home, OpenViewList< View > list, int width0, int sum0, IntPropLevel ipl0)
 OpenSlidingSumEq (Space &home, OpenSlidingSumEq &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.

Static Protected Member Functions

static void linear_term (Linear::Term< IntView > &term, IntView x)
static void linear_term (Linear::Term< IntView > &term, MinusView x)
static ExecStatus binary_sum (Home home, IntView x, IntView y, int sum)
static ExecStatus binary_sum (Home home, MinusView x, MinusView y, int sum)

Protected Attributes

int width
int sum
IntPropLevel ipl
Protected Attributes inherited from Gecode::Int::OpenListPropagator< View >
OpenViewList< View > list
IntView length
int processed

Detailed Description

template<class View>
class Gecode::Int::Sequence::OpenSlidingSumEq< View >

Equal sums via the first complete window and periodic equalities.

Definition at line 266 of file open.hpp.

Constructor & Destructor Documentation

◆ OpenSlidingSumEq() [1/2]

template<class View>
Gecode::Int::Sequence::OpenSlidingSumEq< View >::OpenSlidingSumEq ( Home home,
OpenViewList< View > list,
int width0,
int sum0,
IntPropLevel ipl0 )
inlineprotected

Definition at line 276 of file open.hpp.

◆ OpenSlidingSumEq() [2/2]

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

Definition at line 288 of file open.hpp.

Member Function Documentation

◆ linear_term() [1/2]

template<class View>
void Gecode::Int::Sequence::OpenSlidingSumEq< View >::linear_term ( Linear::Term< IntView > & term,
IntView x )
inlinestaticprotected

Definition at line 293 of file open.hpp.

◆ linear_term() [2/2]

template<class View>
void Gecode::Int::Sequence::OpenSlidingSumEq< View >::linear_term ( Linear::Term< IntView > & term,
MinusView x )
inlinestaticprotected

Definition at line 299 of file open.hpp.

◆ binary_sum() [1/2]

template<class View>
ExecStatus Gecode::Int::Sequence::OpenSlidingSumEq< View >::binary_sum ( Home home,
IntView x,
IntView y,
int sum )
inlinestaticprotected

Definition at line 305 of file open.hpp.

◆ binary_sum() [2/2]

template<class View>
ExecStatus Gecode::Int::Sequence::OpenSlidingSumEq< View >::binary_sum ( Home home,
MinusView x,
MinusView y,
int sum )
inlinestaticprotected

Definition at line 311 of file open.hpp.

◆ copy()

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

Create copy.

Implements Gecode::Actor.

Definition at line 317 of file open.hpp.

◆ propagate()

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

◆ dispose()

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

Delete actor and return its size.

Reimplemented from Gecode::Actor.

Definition at line 368 of file open.hpp.

◆ post()

template<class View>
void Gecode::Int::Sequence::OpenSlidingSumEq< View >::post ( Home home,
OpenViewList< View > list,
int width,
int sum,
IntPropLevel ipl )
inlinestatic

Definition at line 374 of file open.hpp.

Member Data Documentation

◆ width

template<class View>
int Gecode::Int::Sequence::OpenSlidingSumEq< View >::width
protected

Definition at line 272 of file open.hpp.

◆ sum

template<class View>
int Gecode::Int::Sequence::OpenSlidingSumEq< View >::sum
protected

Definition at line 273 of file open.hpp.

◆ ipl

Definition at line 274 of file open.hpp.


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