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

Propagator for channelling between set variable and its characteristic function More...

#include <channel.hh>

Classes

class  IndexAdvisor
 Advisor storing a single index More...

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_QUADRATIC_LO)
virtual void reschedule (Space &home)
 Schedule function.
virtual size_t dispose (Space &home)
 Delete propagator and return its size.
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Give advice to propagator.
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 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, ViewArray< Gecode::Int::BoolView > &x, View y)
 Post propagator for $x_i=j \Leftrightarrow i\in y_j$.
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 MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONESuper

Protected Member Functions

 ChannelBool (Space &home, ChannelBool &p)
 Constructor for cloning p.
 ChannelBool (Home home, ViewArray< Gecode::Int::BoolView > &, View)
 Constructor for posting.
Protected Member Functions inherited from Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONE >
 MixNaryOnePropagator (Space &home, MixNaryOnePropagator &p)
 Constructor for cloning p.
 MixNaryOnePropagator (Home home, ViewArray< Gecode::Int::BoolView > &x, View y)
 Constructor for creation.
 MixNaryOnePropagator (Space &home, Propagator &p, ViewArray< Gecode::Int::BoolView > &x, View y)
 Constructor for rewriting p during cloning.
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

Council< IndexAdvisorco
 Council for managing advisors.
SetDelta delta
 Accumulated delta information.
GLBndSet zeros
 Accumulated zero Booleans.
GLBndSet ones
 Accumulated one Booleans.
bool running
 Flag whether propagation is currently running.
ViewArray< Gecode::Int::BoolViewx
 Array of views.
View y
 Single view.
Protected Attributes inherited from Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONE >
ViewArray< Gecode::Int::BoolViewx
 Array of views.
View y
 Single view.

Detailed Description

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

Propagator for channelling between set variable and its characteristic function

Implements channelling constraints between BoolVar and a SetVar. For BoolVars $x_0,\dots,x_n$ and SetVar $y$ it propagates the constraint $x_i=1 \Leftrightarrow i\in y$.

Requires

Definition at line 148 of file channel.hh.

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ ChannelBool() [1/2]

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

Constructor for cloning p.

Definition at line 111 of file bool.hpp.

◆ ChannelBool() [2/2]

template<class View>
Gecode::Set::Channel::ChannelBool< View >::ChannelBool ( Home home,
ViewArray< Gecode::Int::BoolView > & x0,
View y0 )
inlineprotected

Constructor for posting.

Definition at line 78 of file bool.hpp.

Member Function Documentation

◆ copy()

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

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 148 of file bool.hpp.

◆ cost()

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

Cost function (defined as PC_QUADRATIC_LO)

Reimplemented from Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONE >.

Definition at line 127 of file bool.hpp.

◆ reschedule()

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

◆ dispose()

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

Delete propagator and return its size.

Reimplemented from Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONE >.

Definition at line 140 of file bool.hpp.

◆ propagate()

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 154 of file bool.hpp.

◆ advise()

template<class View>
ExecStatus Gecode::Set::Channel::ChannelBool< View >::advise ( Space & home,
Advisor & a,
const Delta & d )
virtual

Give advice to propagator.

Reimplemented from Gecode::Propagator.

Definition at line 204 of file bool.hpp.

◆ post()

template<class View>
ExecStatus Gecode::Set::Channel::ChannelBool< View >::post ( Home home,
ViewArray< Gecode::Int::BoolView > & x,
View y )
inlinestatic

Post propagator for $x_i=j \Leftrightarrow i\in y_j$.

Definition at line 118 of file bool.hpp.

Member Data Documentation

◆ co

template<class View>
Council<IndexAdvisor> Gecode::Set::Channel::ChannelBool< View >::co
protected

Council for managing advisors.

Definition at line 185 of file channel.hh.

◆ delta

template<class View>
SetDelta Gecode::Set::Channel::ChannelBool< View >::delta
protected

Accumulated delta information.

Definition at line 187 of file channel.hh.

◆ zeros

template<class View>
GLBndSet Gecode::Set::Channel::ChannelBool< View >::zeros
protected

Accumulated zero Booleans.

Definition at line 189 of file channel.hh.

◆ ones

template<class View>
GLBndSet Gecode::Set::Channel::ChannelBool< View >::ones
protected

Accumulated one Booleans.

Definition at line 191 of file channel.hh.

◆ running

template<class View>
bool Gecode::Set::Channel::ChannelBool< View >::running
protected

Flag whether propagation is currently running.

Definition at line 193 of file channel.hh.

◆ x

Array of views.

Definition at line 275 of file pattern.hpp.

◆ y

template<class View>
View Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, pc0, View, pc1 >::y
protected

Single view.

Definition at line 277 of file pattern.hpp.


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