Generated on Mon May 5 05:54:13 2008 for Gecode by doxygen 1.5.5

Gecode::Int::Arithmetic Namespace Reference


Detailed Description

Numerical (arithmetic) propagators.


Classes

class  AbsBnd
 Bounds-consistent absolute value propagator. More...
class  AbsDom
 Domain-consistent absolute value propagator. More...
class  Max
 Bounds-consistent ternary maximum propagator. More...
class  NaryMax
 Bounds-consistent n-ary maximum propagator. More...
class  SqrPlus
 Bounds-consistent positive square propagator. More...
class  Sqr
 Bounds-consistent square propagator. More...
class  Sqrt
 Bounds-consistent square root propagator. More...
class  MultZeroOne
 Bounds-consistent propagator for $x_0\times x_1=x_0$. More...
class  MultPlus
 Bounds-consistent positive multiplication propagator. More...
class  Mult
 Bounds-consistent multiplication propagator. More...

Enumerations

enum  MaxPropStatus { MPS_ASSIGNED = 1<<0, MPS_REMOVED = 1<<1, MPS_NEW_BOUND = 1<<2 }
 Status of propagation for nary max. More...

Functions

template<class View, template< class View0, class View1 > class Eq>
ExecStatus prop_bnd (Space *home, Propagator *p, View x0, View x1)
template<class Val>
Val m (int x, int y)
 Multiply x and y as type Val.
template<class Val>
int c_d_p (int x, int y)
 Compute $\lceil x/y\rceil$ where x and y are non-negative.
template<class Val>
int f_d_p (int x, int y)
 Compute $\lfloor x/y\rfloor$ where x and y are non-negative.
template<>
int c_d_p< int > (int x, int y)
template<>
int c_d_p< double > (int x, int y)
template<>
int f_d_p< int > (int x, int y)
template<>
int f_d_p< double > (int x, int y)
int f_d (int x, int y)
 Compute $\lfloor x/y\rfloor$.
int c_d (int x, int y)
 Compute $\lceil x/y\rceil$.
template<class View>
bool p (const View &x)
 Test whether x is postive.
template<class View>
bool n (const View &x)
 Test whether x is negative.
template<class View>
bool x (const View &x)
 Test whether x is neither positive nor negative.
template<class View>
ExecStatus prop_bnd (Space *home, Propagator *p, ViewArray< View > &)
 Perform bounds-consistent absolute value propagation.


Enumeration Type Documentation

Status of propagation for nary max.

Enumerator:
MPS_ASSIGNED  All views are assigned.
MPS_REMOVED  A view is removed.
MPS_NEW_BOUND  Telling has found a new upper bound.

Definition at line 195 of file max.icc.


Function Documentation

template<class View, template< class View0, class View1 > class Eq>
ExecStatus Gecode::Int::Arithmetic::prop_bnd ( Space *  home,
Propagator *  p,
View  x0,
View  x1 
) [inline]

Definition at line 46 of file abs.icc.

template<class Val>
int Gecode::Int::Arithmetic::m ( int  x,
int  y 
) [inline]

Multiply x and y as type Val.

Definition at line 54 of file mult.icc.

template<class Val>
int Gecode::Int::Arithmetic::c_d_p ( int  x,
int  y 
) [inline]

Compute $\lceil x/y\rceil$ where x and y are non-negative.

template<class Val>
int Gecode::Int::Arithmetic::f_d_p ( int  x,
int  y 
) [inline]

Compute $\lfloor x/y\rfloor$ where x and y are non-negative.

template<>
int Gecode::Int::Arithmetic::c_d_p< int > ( int  x,
int  y 
) [inline]

template<>
int Gecode::Int::Arithmetic::c_d_p< double > ( int  x,
int  y 
) [inline]

template<>
int Gecode::Int::Arithmetic::f_d_p< int > ( int  x,
int  y 
) [inline]

template<>
int Gecode::Int::Arithmetic::f_d_p< double > ( int  x,
int  y 
) [inline]

int Gecode::Int::Arithmetic::f_d ( int  x,
int  y 
) [inline]

Compute $\lfloor x/y\rfloor$.

Definition at line 101 of file mult.icc.

int Gecode::Int::Arithmetic::c_d ( int  x,
int  y 
) [inline]

Compute $\lceil x/y\rceil$.

Definition at line 108 of file mult.icc.

template<class View>
bool Gecode::Int::Arithmetic::p ( const View &  x  )  [inline]

Test whether x is postive.

Definition at line 116 of file mult.icc.

template<class View>
bool Gecode::Int::Arithmetic::n ( const View &  x  )  [inline]

Test whether x is negative.

Definition at line 122 of file mult.icc.

template<class View>
bool Gecode::Int::Arithmetic::x ( const View &  x  )  [inline]

Test whether x is neither positive nor negative.

Definition at line 128 of file mult.icc.

template<class View>
ExecStatus Gecode::Int::Arithmetic::prop_bnd ( Space *  home,
Propagator *  p,
ViewArray< View > &   
) [inline]

Perform bounds-consistent absolute value propagation.

This is actually the propagation algorithm for AbsBnd. It is available as separate function as it is reused for domain-consistent distinct propagators.