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

Propagator for the sorted channel constraint More...

#include <channel.hh>

Public Member Functions

virtual Actorcopy (Space &home)
 Copy propagator during cloning.
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function (defined as PC_LINEAR_LO)
virtual void reschedule (Space &home)
 Schedule function.
virtual size_t dispose (Space &home)
 Delete Propagator.
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
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 s, ViewArray< Gecode::Int::IntView > &x)
 Post propagator that propagates that s contains the $x_i$, which are sorted in non-descending order.
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

 ChannelSorted (Space &home, ChannelSorted &p)
 Constructor for cloning p.
 ChannelSorted (Home home, View, ViewArray< Gecode::Int::IntView > &)
 Constructor for posting.
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 x0
 SetView for the match.
ViewArray< Gecode::Int::IntViewxs
 IntViews that together form the set x0.

Detailed Description

template<class View>
class Gecode::Set::Channel::ChannelSorted< View >

Propagator for the sorted channel constraint

Requires

Definition at line 60 of file channel.hh.

Constructor & Destructor Documentation

◆ ChannelSorted() [1/2]

template<class View>
Gecode::Set::Channel::ChannelSorted< View >::ChannelSorted ( Space & home,
ChannelSorted< View > & p )
inlineprotected

Constructor for cloning p.

Definition at line 57 of file sorted.hpp.

◆ ChannelSorted() [2/2]

template<class View>
Gecode::Set::Channel::ChannelSorted< View >::ChannelSorted ( Home home,
View y0,
ViewArray< Gecode::Int::IntView > & ys )
inlineprotected

Constructor for posting.

Definition at line 48 of file sorted.hpp.

Member Function Documentation

◆ copy()

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

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 106 of file sorted.hpp.

◆ cost()

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

Cost function (defined as PC_LINEAR_LO)

Implements Gecode::Propagator.

Definition at line 84 of file sorted.hpp.

◆ reschedule()

template<class View>
void Gecode::Set::Channel::ChannelSorted< View >::reschedule ( Space & home)
virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 90 of file sorted.hpp.

◆ dispose()

template<class View>
size_t Gecode::Set::Channel::ChannelSorted< View >::dispose ( Space & home)
inlinevirtual

Delete Propagator.

Reimplemented from Gecode::Actor.

Definition at line 97 of file sorted.hpp.

◆ propagate()

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 112 of file sorted.hpp.

◆ post()

template<class View>
ExecStatus Gecode::Set::Channel::ChannelSorted< View >::post ( Home home,
View s,
ViewArray< Gecode::Int::IntView > & x )
inlinestatic

Post propagator that propagates that s contains the $x_i$, which are sorted in non-descending order.

Definition at line 65 of file sorted.hpp.

Member Data Documentation

◆ x0

template<class View>
View Gecode::Set::Channel::ChannelSorted< View >::x0
protected

SetView for the match.

Definition at line 63 of file channel.hh.

◆ xs

IntViews that together form the set x0.

Definition at line 65 of file channel.hh.


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