Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Lexical ordering propagator. More...

#include <rel.hh>

Public Member Functions

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

Static Public Member Functions

static ExecStatus post (Home home, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
 Post propagator for lexical order between x and y.
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s, Space &home)
 Allocate memory from space.
 
static void operator delete (void *p, Space &home)
 No-op for exceptions.
 
static void * operator new (size_t s)
 Not used.
 
static void operator delete (void *p)
 Not used.
 

Protected Member Functions

 LexLqLe (Space &home, LexLqLe< VX, VY > &p)
 Constructor for cloning p.
 
 LexLqLe (Home home, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
 Constructor for posting.
 
- Protected Member Functions inherited from Gecode::Propagator
 Propagator (Home home)
 Constructor for posting.
 
 Propagator (Space &home, Propagator &p)
 Constructor for cloning p.
 
Propagatorfwd (void) const
 Return forwarding pointer during copying.
 
Kernel::GPI::Infogpi (void)
 Provide access to global propagator information.
 

Protected Attributes

ViewArray< VX > x
 View arrays.
 
ViewArray< VY > y
 
bool strict
 Determines whether propagator is strict or not.
 

Detailed Description

template<class VX, class VY>
class Gecode::Int::Rel::LexLqLe< VX, VY >

Lexical ordering propagator.

The propagator uses the algorithm (and also the automaton) from: Mats Carlsson, Nicolas Beldiceanu, Revisiting the Lexicographic Ordering Constraint. SICS Technical Report T2002:17, SICS, Sweden, 2002.

It deviates in the following two main aspects:

  • Assigned variables are eagerly eliminated This yields the same incremental behaviour with respect to states 1 and 2 of the automaton. With respect to the values of q and r in the report:
    • q is always 0 after elimination
    • r is always 1 after elimination
  • It is not incremental with respect to states 3 and 4 as no propagation event information is available

Requires

Definition at line 623 of file rel.hh.

Constructor & Destructor Documentation

◆ LexLqLe() [1/2]

template<class VX , class VY >
Gecode::Int::Rel::LexLqLe< VX, VY >::LexLqLe ( Space & home,
LexLqLe< VX, VY > & p )
inlineprotected

Constructor for cloning p.

Definition at line 50 of file lex.hpp.

◆ LexLqLe() [2/2]

template<class VX , class VY >
Gecode::Int::Rel::LexLqLe< VX, VY >::LexLqLe ( Home home,
ViewArray< VX > & x,
ViewArray< VY > & y,
bool strict )
inlineprotected

Constructor for posting.

Definition at line 41 of file lex.hpp.

Member Function Documentation

◆ copy()

template<class VX , class VY >
Actor * Gecode::Int::Rel::LexLqLe< VX, VY >::copy ( Space & home)
virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 58 of file lex.hpp.

◆ cost()

template<class VX , class VY >
PropCost Gecode::Int::Rel::LexLqLe< VX, VY >::cost ( const Space & home,
const ModEventDelta & med ) const
virtual

Cost function (defined as low linear)

Implements Gecode::Propagator.

Definition at line 64 of file lex.hpp.

◆ reschedule()

template<class VX , class VY >
void Gecode::Int::Rel::LexLqLe< VX, VY >::reschedule ( Space & home)
virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 70 of file lex.hpp.

◆ propagate()

template<class VX , class VY >
ExecStatus Gecode::Int::Rel::LexLqLe< VX, VY >::propagate ( Space & home,
const ModEventDelta & med )
virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 87 of file lex.hpp.

◆ post()

template<class VX , class VY >
ExecStatus Gecode::Int::Rel::LexLqLe< VX, VY >::post ( Home home,
ViewArray< VX > & x,
ViewArray< VY > & y,
bool strict )
static

Post propagator for lexical order between x and y.

Definition at line 241 of file lex.hpp.

◆ dispose()

template<class VX , class VY >
size_t Gecode::Int::Rel::LexLqLe< VX, VY >::dispose ( Space & home)
inlinevirtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 77 of file lex.hpp.

Member Data Documentation

◆ x

template<class VX , class VY >
ViewArray<VX> Gecode::Int::Rel::LexLqLe< VX, VY >::x
protected

View arrays.

Definition at line 626 of file rel.hh.

◆ y

template<class VX , class VY >
ViewArray<VY> Gecode::Int::Rel::LexLqLe< VX, VY >::y
protected

Definition at line 627 of file rel.hh.

◆ strict

template<class VX , class VY >
bool Gecode::Int::Rel::LexLqLe< VX, VY >::strict
protected

Determines whether propagator is strict or not.

Definition at line 629 of file rel.hh.


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