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

Gecode::Int::Sorted::Sorted< View, Tuple, Perm > Class Template Reference
[Integer propagators]

#include <sorted.hh>

Inherits Gecode::Propagator.

List of all members.


Detailed Description

template<class View, class Tuple, bool Perm>
class Gecode::Int::Sorted::Sorted< View, Tuple, Perm >

Bounds-consistent sortedness propagator.

The algorithm is taken from: Sven Thiel, Efficient Algorithms for Constraint Propagation and for Processing Tree Descriptions, PhD thesis, Universität des Saarlandes, Germany, 2004, pages 39-59.

Requires

Definition at line 63 of file sorted.hh.


Public Member Functions

virtual size_t dispose (Space *home)
 Delete propagator and return its size.
virtual Actorcopy (Space *home, bool share)
 Copy propagator during cloning.
virtual PropCost cost (ModEventDelta med) const
 Cost function returning PC_LINEAR_HI.
virtual ExecStatus propagate (Space *home, ModEventDelta med)
 Perform propagation.

Static Public Member Functions

static ExecStatus post (Space *, ViewArray< Tuple > &, ViewArray< View > &)
 Post propagator for the views xz and y.

Protected Member Functions

 Sorted (Space *, ViewArray< Tuple > &, ViewArray< View > &)
 Constructor for posting.
 Sorted (Space *home, bool share, Sorted< View, Tuple, Perm > &p)
 Constructor for cloning.

Protected Attributes

ViewArray< Tuple > xz
 Views to be sorted.
ViewArray< View > y
 Views denoting the sorted version of x.
ViewArray< View > w
 original y array
int reachable
 connection to dropped view

Constructor & Destructor Documentation

template<class View, class Tuple, bool Perm>
Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::Sorted ( Space home,
ViewArray< Tuple > &  xz0,
ViewArray< View > &  y0 
) [inline, protected]

Constructor for posting.

Definition at line 370 of file propagate.icc.

template<class View, class Tuple, bool Perm>
Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::Sorted ( Space home,
bool  share,
Sorted< View, Tuple, Perm > &  p 
) [inline, protected]

Constructor for cloning.

Definition at line 360 of file propagate.icc.


Member Function Documentation

template<class View, class Tuple, bool Perm>
size_t Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::dispose ( Space home  )  [inline, virtual]

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 379 of file propagate.icc.

template<class View, class Tuple, bool Perm>
Actor * Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::copy ( Space home,
bool  share 
) [inline, virtual]

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 388 of file propagate.icc.

template<class View, class Tuple, bool Perm>
PropCost Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::cost ( ModEventDelta  med  )  const [inline, virtual]

Cost function returning PC_LINEAR_HI.

Implements Gecode::Propagator.

Definition at line 393 of file propagate.icc.

template<class View, class Tuple, bool Perm>
ExecStatus Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::propagate ( Space home,
ModEventDelta  med 
) [inline, virtual]

Perform propagation.

Implements Gecode::Propagator.

Definition at line 399 of file propagate.icc.

template<class View, class Tuple, bool Perm>
ExecStatus Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::post ( Space home,
ViewArray< Tuple > &  xz0,
ViewArray< View > &  y0 
) [inline, static]

Post propagator for the views xz and y.

Definition at line 640 of file propagate.icc.


Member Data Documentation

template<class View, class Tuple, bool Perm>
ViewArray<Tuple> Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::xz [protected]

Views to be sorted.

If Tuple is instantiated to ViewTuple<View,2>, $xz_i$ is a pair $(x_i, z_i)$, where $x_i$ denotes an unsorted view and $z_i$ is the explicit permutation view mapping $x_i$ to its unsorted counterpart $y_{z_i}$. If Tuple is instantiated to ViewTuple<View,1>, $xz_i$ is the unsorted view $x_i$ lifted to a ViewTuple.

Definition at line 78 of file sorted.hh.

template<class View, class Tuple, bool Perm>
ViewArray<View> Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::y [protected]

Views denoting the sorted version of x.

Definition at line 81 of file sorted.hh.

template<class View, class Tuple, bool Perm>
ViewArray<View> Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::w [protected]

original y array

Definition at line 83 of file sorted.hh.

template<class View, class Tuple, bool Perm>
int Gecode::Int::Sorted::Sorted< View, Tuple, Perm >::reachable [protected]

connection to dropped view

Definition at line 85 of file sorted.hh.


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