Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm > Class Template Reference
[Integer propagators]
#include <sortedness.hh>
Inherits Gecode::Propagator.
Detailed Description
template<class View, class Tuple, bool Perm>
class Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >
Bounds consistent sortedness propagator.
- [Reference]
- The algorithm is taken from:
Sven Thiel: Efficient Algorithms for Constraint Propagation and for Processing Tree Descriptions (pages 39 to 59) [http://www.mpi-sb.mpg.de/~sthiel/thesis.pdf]
#include "gecode/int/sortedness.hh"
#include "gecode/int/distinct.hh"
- Note:
- The sortedness propagator does not support sharing!
Definition at line 54 of file sortedness.hh.
Public Member Functions | |
virtual size_t | dispose (Space *home) |
Delete propagator and return its size. | |
virtual Actor * | copy (Space *home, bool share) |
Copy propagator during cloning. | |
virtual PropCost | cost (void) const |
Cost function returning PC_LINEAR_HI. | |
virtual ExecStatus | propagate (Space *home) |
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 | |
Sortedness (Space *, ViewArray< Tuple > &, ViewArray< View > &) | |
Constructor for posting. | |
Sortedness (Space *home, bool share, Sortedness< 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
Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::Sortedness | ( | Space * | , | |
ViewArray< Tuple > & | , | |||
ViewArray< View > & | ||||
) | [protected] |
Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::Sortedness | ( | Space * | home, | |
bool | share, | |||
Sortedness< View, Tuple, Perm > & | p | |||
) | [inline, protected] |
Member Function Documentation
size_t Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::dispose | ( | Space * | home | ) | [virtual] |
Delete propagator and return its size.
Reimplemented from Gecode::Actor.
Definition at line 406 of file sortedness.icc.
Actor * Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::copy | ( | Space * | home, | |
bool | share | |||
) | [virtual] |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 415 of file sortedness.icc.
PropCost Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::cost | ( | void | ) | const [virtual] |
Cost function returning PC_LINEAR_HI.
Implements Gecode::Propagator.
Definition at line 420 of file sortedness.icc.
ExecStatus Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::propagate | ( | Space * | home | ) | [virtual] |
ExecStatus Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::post | ( | Space * | , | |
ViewArray< Tuple > & | , | |||
ViewArray< View > & | ||||
) | [static] |
Member Data Documentation
ViewArray<Tuple> Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::xz [protected] |
Views to be sorted.
If Tuple is instantiated to ViewTuple<View,2>, is a pair
, where
denotes an unsorted view and
is the explicit permutation view mapping
to its unsorted counterpart
. If Tuple is instantiated to ViewTuple<View,1>,
is the unsorted view
lifted to a ViewTuple.
Definition at line 69 of file sortedness.hh.
ViewArray<View> Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::y [protected] |
ViewArray<View> Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::w [protected] |
int Gecode::Int::Sortedness::Sortedness< View, Tuple, Perm >::reachable [protected] |
The documentation for this class was generated from the following files:
- gecode/int/sortedness.hh (Revision: 3246)
- gecode/int/sortedness/sortedness.icc (Revision: 3246)