Generated on Sat Feb 7 2015 02:01:47 for Gecode by doxygen 1.8.9.1
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 ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation. More...
 
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function. 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...
 
double afc (const Space &home) const
 Return the accumlated failure count. More...
 
- Public Member Functions inherited from Gecode::Actor

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, 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...
 
virtual ~Base (void)
 Unused destructor (to avoid warnings) 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...
 

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 343 of file extensional.hh.

Constructor & Destructor Documentation

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

Constructor for cloning p.

Definition at line 319 of file incremental.hpp.

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

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

Initialize support.

Definition at line 209 of file incremental.hpp.

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.

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.

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.

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.

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

Perform propagation.

Implements Gecode::Propagator.

Definition at line 377 of file incremental.hpp.

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 343 of file incremental.hpp.

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 352 of file incremental.hpp.

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 307 of file incremental.hpp.

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 358 of file incremental.hpp.

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 414 of file incremental.hpp.

Member Data Documentation

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

Work for finding support.

Definition at line 440 of file extensional.hh.

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

Work for removing values.

Definition at line 442 of file extensional.hh.

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

Support information.

Definition at line 445 of file extensional.hh.

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

Number of unassigned views.

Definition at line 447 of file extensional.hh.


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