Generated on Sat Feb 7 2015 02:01:46 for Gecode by doxygen 1.8.9.1
Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom > Class Template Reference

Propagator for counting views (equal to number of equal views) More...

#include <count.hh>

Public Member Functions

 EqView (Home home, ViewArray< VX > &x, VY y, VZ z, int c)
 Constructor for creation. More...
 
virtual Actorcopy (Space &home, bool share)
 Create copy during cloning. More...
 
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation. More...
 
- Public Member Functions inherited from Gecode::Int::Count::ViewBase< VX, VY, VZ >
virtual size_t dispose (Space &home)
 Delete propagator and return its size. More...
 
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function (defined as low linear) More...
 
- Public Member Functions inherited from Gecode::Propagator
ModEventDelta modeventdelta (void) const
 Return the modification event delta. More...
 
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Advise function. More...
 
double afc (const Space &home) const
 Return the accumlated failure count. More...
 
- Public Member Functions inherited from Gecode::Actor

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< VX > &x, VY y, VZ z, int c)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}=z+c$. More...
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 No-op for exceptions. More...
 

Protected Member Functions

 EqView (Space &home, bool share, EqView &p)
 Constructor for cloning p. More...
 
- Protected Member Functions inherited from Gecode::Int::Count::ViewBase< VX, VY, VZ >
 ViewBase (Space &home, bool share, ViewBase &p)
 Constructor for cloning p. More...
 
 ViewBase (Home home, ViewArray< VX > &x, VY y, VZ z, int c)
 Constructor for creation. More...
 
void count (Space &home)
 Count how many views are equal now. More...
 
int atleast (void) const
 How many views are at least equal. More...
 
int atmost (void) const
 How many views are at most equal. More...
 
- Protected Member Functions inherited from Gecode::Propagator
 Propagator (Home home)
 Constructor for posting. More...
 
 Propagator (Space &home, bool share, Propagator &p)
 Constructor for cloning p. More...
 
Propagatorfwd (void) const
 Return forwarding pointer during copying. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Gecode::Int::Count::ViewBase< VX, VY, VZ >
static bool sharing (const ViewArray< VX > &x, const VY &y, const VZ &z)
 Test whether there is sharing of z with x or y. More...
 
- Protected Attributes inherited from Gecode::Int::Count::ViewBase< VX, VY, VZ >
ViewArray< VX > x
 Views still to count. More...
 
VY y
 View to compare to. More...
 
VZ z
 View which yields result of counting. More...
 
int c
 Number of views which are equal and have been eliminated. More...
 

Detailed Description

template<class VX, class VY, class VZ, bool shr, bool dom>
class Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >

Propagator for counting views (equal to number of equal views)

Not all combinations of views are possible. The types VX and VY must be either equal, or VY must be ConstIntView, ZeroIntView, or IntSet.

Requires

Definition at line 306 of file count.hh.

Constructor & Destructor Documentation

template<class VX , class VY , class VZ , bool shr, bool dom>
Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >::EqView ( Space home,
bool  share,
EqView< VX, VY, VZ, shr, dom > &  p 
)
inlineprotected

Constructor for cloning p.

Definition at line 63 of file view-eq.hpp.

template<class VX , class VY , class VZ , bool shr, bool dom>
Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >::EqView ( Home  home,
ViewArray< VX > &  x,
VY  y,
VZ  z,
int  c 
)
inline

Constructor for creation.

Definition at line 42 of file view-eq.hpp.

Member Function Documentation

template<class VX , class VY , class VZ , bool shr, bool dom>
Actor * Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >::copy ( Space home,
bool  share 
)
virtual

Create copy during cloning.

Implements Gecode::Actor.

Definition at line 69 of file view-eq.hpp.

template<class VX , class VY , class VZ , bool shr, bool dom>
ExecStatus Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >::propagate ( Space home,
const ModEventDelta med 
)
virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 75 of file view-eq.hpp.

template<class VX , class VY , class VZ , bool shr, bool dom>
ExecStatus Gecode::Int::Count::EqView< VX, VY, VZ, shr, dom >::post ( Home  home,
ViewArray< VX > &  x,
VY  y,
VZ  z,
int  c 
)
static

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}=z+c$.

Definition at line 48 of file view-eq.hpp.


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