Generated on Sat Jan 20 2018 22:21:25 for Gecode by doxygen 1.8.13
Gecode::Int::Sorted::Sorted< View, Perm > Class Template Reference

Bounds consistent sortedness propagator. More...

#include <sorted.hh>

Public Member Functions

virtual size_t dispose (Space &home)
 Delete propagator and return its size. More...
 
virtual Actorcopy (Space &home, bool share)
 Copy propagator during cloning. More...
 
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function returning low linear. More...
 
virtual void reschedule (Space &home)
 Schedule function. More...
 
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation. 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...
 
virtual void advise (Space &home, Advisor &a)
 Run advisor a to be run on failure in failed space. More...
 
double afc (void) const
 Return the accumlated failure count. More...
 
unsigned int id (void) const
 Return propagator id. More...
 
PropagatorGroup group (void) const
 Return group propagator belongs to. More...
 
void group (PropagatorGroup g)
 Add propagator to group g. More...
 
bool disabled (void) const
 Whether propagator is currently disabled. More...
 
- Public Member Functions inherited from Gecode::Actor
virtual ~Actor (void)
 To avoid warnings. More...
 

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< View > &x, ViewArray< View > &y, ViewArray< View > &z)
 Post propagator for views x, y, and z. More...
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s)
 Not used. More...
 
static void operator delete (void *p)
 Not used. More...
 
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

 Sorted (Home home, ViewArray< View > &x, ViewArray< View > &y, ViewArray< View > &z)
 Constructor for posting. More...
 
 Sorted (Space &home, bool share, Sorted< View, Perm > &p)
 Constructor for cloning. 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...
 
GPI::Infogpi (void)
 Provide access to global propagator information. More...
 

Protected Attributes

ViewArray< View > x
 Views to be sorted. More...
 
ViewArray< View > y
 Views denoting the sorted version of x. More...
 
ViewArray< View > z
 Permutation variables (none, if Perm is false) More...
 
ViewArray< View > w
 Original y array. More...
 
int reachable
 connection to dropped view More...
 

Detailed Description

template<class View, bool Perm>
class Gecode::Int::Sorted::Sorted< View, 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.

Constructor & Destructor Documentation

◆ Sorted() [1/2]

template<class View , bool Perm>
Gecode::Int::Sorted::Sorted< View, Perm >::Sorted ( Home  home,
ViewArray< View > &  x,
ViewArray< View > &  y,
ViewArray< View > &  z 
)
protected

Constructor for posting.

Definition at line 354 of file propagate.hpp.

◆ Sorted() [2/2]

template<class View , bool Perm>
Gecode::Int::Sorted::Sorted< View, Perm >::Sorted ( Space home,
bool  share,
Sorted< View, Perm > &  p 
)
inlineprotected

Constructor for cloning.

Definition at line 343 of file propagate.hpp.

Member Function Documentation

◆ dispose()

template<class View , bool Perm>
size_t Gecode::Int::Sorted::Sorted< View, Perm >::dispose ( Space home)
inlinevirtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 365 of file propagate.hpp.

◆ copy()

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

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 375 of file propagate.hpp.

◆ cost()

template<class View , bool Perm>
PropCost Gecode::Int::Sorted::Sorted< View, Perm >::cost ( const Space home,
const ModEventDelta med 
) const
virtual

Cost function returning low linear.

Implements Gecode::Propagator.

Definition at line 380 of file propagate.hpp.

◆ reschedule()

template<class View , bool Perm>
void Gecode::Int::Sorted::Sorted< View, Perm >::reschedule ( Space home)
virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 386 of file propagate.hpp.

◆ propagate()

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 395 of file propagate.hpp.

◆ post()

template<class View , bool Perm>
ExecStatus Gecode::Int::Sorted::Sorted< View, Perm >::post ( Home  home,
ViewArray< View > &  x,
ViewArray< View > &  y,
ViewArray< View > &  z 
)
static

Post propagator for views x, y, and z.

Definition at line 633 of file propagate.hpp.

Member Data Documentation

◆ x

template<class View , bool Perm>
ViewArray<View> Gecode::Int::Sorted::Sorted< View, Perm >::x
protected

Views to be sorted.

Definition at line 66 of file sorted.hh.

◆ y

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

Views denoting the sorted version of x.

Definition at line 68 of file sorted.hh.

◆ z

template<class View , bool Perm>
ViewArray<View> Gecode::Int::Sorted::Sorted< View, Perm >::z
protected

Permutation variables (none, if Perm is false)

Definition at line 70 of file sorted.hh.

◆ w

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

Original y array.

Definition at line 72 of file sorted.hh.

◆ reachable

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

connection to dropped view

Definition at line 74 of file sorted.hh.


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