Generated on Fri Jul 13 2018 06:08:40 for Gecode by doxygen 1.8.14
Gecode::Int::Extensional::Incremental< View > Class Template Reference

Domain consistent extensional propagator. More...

#include <extensional.hh>

Classes

class  SupportEntry
 Entry for storing support. More...
 
class  Work
 Work stack More...
 
class  WorkEntry
 Description of work to be done. More...
 

Public Member Functions

virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function. More...
 
virtual void reschedule (Space &home)
 Schedule function. More...
 
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation. More...
 
virtual Actorcopy (Space &home, bool share)
 Copy propagator during cloning. More...
 
size_t dispose (Space &home)
 Delete propagator and return its size. More...
 
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Give advice to propagator. More...
 
- Public Member Functions inherited from Gecode::Propagator
ModEventDelta modeventdelta (void) const
 Return the modification event delta. 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, const TupleSet &t)
 Post propagator for views x. 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

 Incremental (Space &home, bool share, Incremental< View > &p)
 Constructor for cloning p. More...
 
 Incremental (Home home, ViewArray< View > &x, const TupleSet &t)
 Constructor for posting. More...
 
void init_support (Space &home)
 Initialize support. More...
 
void find_support (Space &home, Domain dom, int i, int n)
 Find a next support for view at position i and value n. More...
 
void add_support (Space &home, Tuple l)
 Add support. More...
 
void remove_support (Space &home, Tuple l, int i, int n)
 Remove support for view at position i and value n. More...
 
SupportEntrysupport (int i, int n)
 Creat support entry for view at position i and value n. More...
 
- Protected Member Functions inherited from Gecode::Int::Extensional::Base< View, false >
TupleSet::TupleSetIts (void)
 
 Base (Space &home, bool share, Base< View, subscribe > &p)
 Constructor for cloning p. More...
 
 Base (Home home, ViewArray< View > &x, const TupleSet &t)
 Constructor for posting. More...
 
void init_last (Space &home, Tuple **source, Tuple *base)
 Initialize last support. More...
 
Tuple last (int i, int n)
 Find last support for view at position i and value n. More...
 
Tuple last_next (int i, int n)
 Find last support for view at position i and value n. More...
 
void init_dom (Space &home, Domain dom)
 Initialize domain information. More...
 
bool valid (Tuple t, Domain dom)
 Check wether tuple is valid for domain. More...
 
Tuple find_support (Domain dom, int i, int n)
 Find support for view at position i and value n. 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

Work w_support
 Work for finding support. More...
 
Work w_remove
 Work for removing values. More...
 
SupportEntry ** support_data
 Support information. More...
 
int unassigned
 Number of unassigned views. More...
 
- Protected Attributes inherited from Gecode::Int::Extensional::Base< View, false >
ViewArray< View > x
 Variables. More...
 
TupleSet tupleSet
 Definition of constraint. More...
 
Tuple ** last_data
 Last tuple looked at Access real tuple-set. More...
 

Detailed Description

template<class View>
class Gecode::Int::Extensional::Incremental< View >

Domain consistent extensional propagator.

This propagator implements an incremental propagation algorithm where supports are maintained explicitly.

Requires

Definition at line 345 of file extensional.hh.

Constructor & Destructor Documentation

◆ Incremental() [1/2]

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

Constructor for cloning p.

Definition at line 328 of file incremental.hpp.

◆ Incremental() [2/2]

template<class View >
Gecode::Int::Extensional::Incremental< View >::Incremental ( Home  home,
ViewArray< View > &  x,
const TupleSet t 
)
inlineprotected

Constructor for posting.

Definition at line 276 of file incremental.hpp.

Member Function Documentation

◆ init_support()

template<class View >
void Gecode::Int::Extensional::Incremental< View >::init_support ( Space home)
inlineprotected

Initialize support.

Definition at line 209 of file incremental.hpp.

◆ find_support()

template<class View >
void Gecode::Int::Extensional::Incremental< View >::find_support ( Space home,
Domain  dom,
int  i,
int  n 
)
inlineprotected

Find a next support for view at position i and value n.

Definition at line 228 of file incremental.hpp.

◆ add_support()

template<class View >
void Gecode::Int::Extensional::Incremental< View >::add_support ( Space home,
Tuple  l 
)
inlineprotected

Add support.

Definition at line 219 of file incremental.hpp.

◆ remove_support()

template<class View >
void Gecode::Int::Extensional::Incremental< View >::remove_support ( Space home,
Tuple  l,
int  i,
int  n 
)
inlineprotected

Remove support for view at position i and value n.

Definition at line 244 of file incremental.hpp.

◆ support()

template<class View >
Incremental< View >::SupportEntry * Gecode::Int::Extensional::Incremental< View >::support ( int  i,
int  n 
)
inlineprotected

Creat support entry for view at position i and value n.

Definition at line 203 of file incremental.hpp.

◆ cost()

template<class View >
PropCost Gecode::Int::Extensional::Incremental< View >::cost ( const Space home,
const ModEventDelta med 
) const
virtual

Cost function.

If in stage for naive value propagation, the cost is high quadratic. Otherwise it is high cubic.

Reimplemented from Gecode::Int::Extensional::Base< View, false >.

Definition at line 352 of file incremental.hpp.

◆ reschedule()

template<class View >
void Gecode::Int::Extensional::Incremental< View >::reschedule ( Space home)
virtual

Schedule function.

Reimplemented from Gecode::Int::Extensional::Base< View, false >.

Definition at line 307 of file incremental.hpp.

◆ propagate()

template<class View >
ExecStatus Gecode::Int::Extensional::Incremental< View >::propagate ( Space home,
const ModEventDelta med 
)
virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 386 of file incremental.hpp.

◆ copy()

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

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 361 of file incremental.hpp.

◆ post()

template<class View >
ExecStatus Gecode::Int::Extensional::Incremental< View >::post ( Home  home,
ViewArray< View > &  x,
const TupleSet t 
)
inlinestatic

Post propagator for views x.

Definition at line 316 of file incremental.hpp.

◆ dispose()

template<class View >
size_t Gecode::Int::Extensional::Incremental< View >::dispose ( Space home)
inlinevirtual

Delete propagator and return its size.

Reimplemented from Gecode::Int::Extensional::Base< View, false >.

Definition at line 367 of file incremental.hpp.

◆ advise()

template<class View >
ExecStatus Gecode::Int::Extensional::Incremental< View >::advise ( Space home,
Advisor a,
const Delta d 
)
virtual

Give advice to propagator.

Reimplemented from Gecode::Propagator.

Definition at line 423 of file incremental.hpp.

Member Data Documentation

◆ w_support

template<class View>
Work Gecode::Int::Extensional::Incremental< View >::w_support
protected

Work for finding support.

Definition at line 442 of file extensional.hh.

◆ w_remove

template<class View>
Work Gecode::Int::Extensional::Incremental< View >::w_remove
protected

Work for removing values.

Definition at line 444 of file extensional.hh.

◆ support_data

template<class View>
SupportEntry** Gecode::Int::Extensional::Incremental< View >::support_data
protected

Support information.

Definition at line 447 of file extensional.hh.

◆ unassigned

template<class View>
int Gecode::Int::Extensional::Incremental< View >::unassigned
protected

Number of unassigned views.

Definition at line 449 of file extensional.hh.


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