Generated on Wed Jan 4 17:49:20 2006 for Gecode by doxygen 1.4.6

Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr > Class Template Reference

#include <count.hh>

Inherits Gecode::Propagator.

Inherited by Gecode::Int::Count::Eq< VX, VY, VZ, Rel, shr >, Gecode::Int::Count::Gq< VX, VY, VZ, Rel, shr >, Gecode::Int::Count::Lq< VX, VY, VZ, Rel, shr >, and Gecode::Int::Count::Nq< VX, VY, VZ, Rel, shr >.

List of all members.


Detailed Description

template<class VX, class VY, class VZ, class Rel, bool shr>
class Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >

Base-class for count propagators.

Definition at line 41 of file count.hh.

Public Member Functions

virtual ~Base (void)
 Destructor.
virtual PropCost cost (void) const
 Cost function (defined as dynamic PC_LINEAR_LO).

Protected Member Functions

 Base (Space *home, bool shr, Base &p)
 Constructor for cloning p.
 Base (Space *home, ViewArray< VX > &x, VY y, VZ z, int c)
 Constructor for creation.
int atleast (void) const
 How many views are at least equal.
int atmost (void) const
 How many views are at most equal.

Static Protected Member Functions

static bool sharing (const ViewArray< VX > &x, const VY &y, const VZ &z)
 Test whether there is sharing of z with x or y.

Protected Attributes

ViewArray< VX > x
 Views still to count.
VY y
 View to compare to.
VZ z
 View which yields result of counting.
int c
 Number of views which are equal and have been eliminated.
Rel r
 Equality relation used in counting.


Constructor & Destructor Documentation

template<class VX, class VY, class VZ, class Rel, bool shr>
Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::Base Space home,
bool  shr,
Base< VX, VY, VZ, Rel, shr > &  p
[protected]
 

Constructor for cloning p.

template<class VX, class VY, class VZ, class Rel, bool shr>
Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::Base Space home,
ViewArray< VX > &  x,
VY  y,
VZ  z,
int  c
[protected]
 

Constructor for creation.

Definition at line 30 of file count.icc.

template<class VX, class VY, class VZ, class Rel, bool shr>
Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::~Base void   )  [inline, virtual]
 

Destructor.

Definition at line 56 of file count.icc.


Member Function Documentation

template<class VX, class VY, class VZ, class Rel, bool shr>
PropCost Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::cost void   )  const [virtual]
 

Cost function (defined as dynamic PC_LINEAR_LO).

Implements Gecode::Propagator.

Definition at line 50 of file count.icc.

template<class VX, class VY, class VZ, class Rel, bool shr>
int Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::atleast void   )  const [inline, protected]
 

How many views are at least equal.

Definition at line 64 of file count.icc.

template<class VX, class VY, class VZ, class Rel, bool shr>
int Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::atmost void   )  const [inline, protected]
 

How many views are at most equal.

Definition at line 70 of file count.icc.

template<class VX, class VY, class VZ, class Rel, bool shr>
bool Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::sharing const ViewArray< VX > &  x,
const VY &  y,
const VZ &  z
[inline, static, protected]
 

Test whether there is sharing of z with x or y.

Definition at line 76 of file count.icc.


Member Data Documentation

template<class VX, class VY, class VZ, class Rel, bool shr>
ViewArray<VX> Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::x [protected]
 

Views still to count.

Definition at line 44 of file count.hh.

template<class VX, class VY, class VZ, class Rel, bool shr>
VY Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::y [protected]
 

View to compare to.

Definition at line 46 of file count.hh.

template<class VX, class VY, class VZ, class Rel, bool shr>
VZ Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::z [protected]
 

View which yields result of counting.

Definition at line 48 of file count.hh.

template<class VX, class VY, class VZ, class Rel, bool shr>
int Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::c [protected]
 

Number of views which are equal and have been eliminated.

Definition at line 50 of file count.hh.

template<class VX, class VY, class VZ, class Rel, bool shr>
Rel Gecode::Int::Count::Base< VX, VY, VZ, Rel, shr >::r [protected]
 

Equality relation used in counting.

Definition at line 52 of file count.hh.


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