Generated on Fri Oct 19 11:26:22 2018 for Gecode by doxygen 1.6.3

Gecode::Set::Channel::ChannelInt< View > Class Template Reference
[Set propagators]

Propagator for channelling between variable-value-dual models More...

#include <channel.hh>

List of all members.

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.

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > &x, ViewArray< CachedView< View > > &y)
 Post propagator for $x_i=j \Leftrightarrow i\in y_j$.

Protected Member Functions

 ChannelInt (Space &home, ChannelInt &p)
 Constructor for cloning p.
 ChannelInt (Home home, ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > &, ViewArray< CachedView< View > > &)
 Constructor for posting.

Protected Attributes

ViewArray
< Gecode::Int::CachedView
< Gecode::Int::IntView > > 
xs
 IntViews, $x_i$ reflects which set contains element $i$.
ViewArray< CachedView< View > > ys
 SetViews that are constrained to be disjoint.

Detailed Description

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

Propagator for channelling between variable-value-dual models

Implements channelling constraints between IntVars and SetVars. For IntVars $x_0,\dots,x_n$ and SetVars $y_0,\dots,y_m$ it propagates the constraint $x_i=j \Leftrightarrow i\in y_j$.

Can be used to implement the "channelling constraints" for disjoint with cardinalities from "Disjoint, Partition and Intersection Constraints for Set and Multiset Variables" Christian Bessiere, Emmanuel Hebrard, Brahim Hnich, Toby Walsh CP 2004

Requires

 #include <gecode/set/int.hh> 

Definition at line 105 of file channel.hh.


Constructor & Destructor Documentation

template<class View >
Gecode::Set::Channel::ChannelInt< View >::ChannelInt ( Space home,
ChannelInt< View > &  p 
) [inline, protected]

Constructor for cloning p.

Definition at line 59 of file int.hpp.

template<class View >
Gecode::Set::Channel::ChannelInt< View >::ChannelInt ( Home  home,
ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > &  xs0,
ViewArray< CachedView< View > > &  ys0 
) [inline, protected]

Constructor for posting.

Definition at line 44 of file int.hpp.


Member Function Documentation

template<class View >
Actor * Gecode::Set::Channel::ChannelInt< View >::copy ( Space home  )  [inline, virtual]

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 115 of file int.hpp.

template<class View >
PropCost Gecode::Set::Channel::ChannelInt< View >::cost ( const Space home,
const ModEventDelta med 
) const [inline, virtual]

Cost function (defined as PC_QUADRATIC_LO).

Implements Gecode::Propagator.

Definition at line 93 of file int.hpp.

template<class View >
void Gecode::Set::Channel::ChannelInt< View >::reschedule ( Space home  )  [inline, virtual]

Schedule function.

Implements Gecode::Propagator.

Definition at line 99 of file int.hpp.

template<class View >
size_t Gecode::Set::Channel::ChannelInt< View >::dispose ( Space home  )  [inline, virtual]

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 106 of file int.hpp.

template<class View >
ExecStatus Gecode::Set::Channel::ChannelInt< View >::propagate ( Space home,
const ModEventDelta med 
) [inline, virtual]

Perform propagation.

Implements Gecode::Propagator.

Definition at line 121 of file int.hpp.

template<class View >
ExecStatus Gecode::Set::Channel::ChannelInt< View >::post ( Home  home,
ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > &  x,
ViewArray< CachedView< View > > &  y 
) [inline, static]

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

Definition at line 67 of file int.hpp.


Member Data Documentation

IntViews, $x_i$ reflects which set contains element $i$.

Definition at line 108 of file channel.hh.

template<class View >
ViewArray<CachedView<View> > Gecode::Set::Channel::ChannelInt< View >::ys [protected]

SetViews that are constrained to be disjoint.

Definition at line 110 of file channel.hh.


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