Generated on Sat Feb 7 2015 02:01:47 for Gecode by doxygen 1.8.9.1
Gecode::Int::GCC::Dom< Card > Class Template Reference

Domain consistent global cardinality propagator. More...

#include <gcc.hh>

Public Member Functions

virtual Actorcopy (Space &home, bool share)
 Copy propagator during cloning. More...
 
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function. More...
 
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation. More...
 
virtual size_t dispose (Space &home)
 Destructor. 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...
 
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< IntView > &x, ViewArray< Card > &k)
 Post propagator for views x and cardinalities k. 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

 Dom (Space &home, bool share, Dom< Card > &p)
 Constructor for cloning p. More...
 
 Dom (Home home, ViewArray< IntView > &, ViewArray< Card > &, bool)
 Constructor for posting. 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

ViewArray< IntViewx
 Views on which to perform domain-propagation. More...
 
ViewArray< IntViewy
 Views used to channel information between x and k ( $ x \subseteq y $). More...
 
ViewArray< Card > k
 Array containing either fixed cardinalities or CardViews. More...
 
VarValGraph< Card > * vvg
 Propagation is performed on a variable-value graph (used as cache) More...
 
bool card_fixed
 Stores whether cardinalities are all assigned. More...
 

Detailed Description

template<class Card>
class Gecode::Int::GCC::Dom< Card >

Domain consistent global cardinality propagator.

The algorithm is taken from: Claude-Guy Quimper, Peter van Beek, Alejandro López-Ortiz, and Alexander Golynski. Improved Algorithms for the Global Cardinality Constraint, CP 2004, pages 542-556.

Requires

#include <gecode/int/gcc.hh>

Definition at line 219 of file gcc.hh.

Constructor & Destructor Documentation

template<class Card >
Gecode::Int::GCC::Dom< Card >::Dom ( Space home,
bool  share,
Dom< Card > &  p 
)
inlineprotected

Constructor for cloning p.

Definition at line 83 of file dom.hpp.

template<class Card >
Gecode::Int::GCC::Dom< Card >::Dom ( Home  home,
ViewArray< IntView > &  x0,
ViewArray< Card > &  k0,
bool  cf 
)
inlineprotected

Constructor for posting.

Definition at line 71 of file dom.hpp.

Member Function Documentation

template<class Card >
Actor * Gecode::Int::GCC::Dom< Card >::copy ( Space home,
bool  share 
)
virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 101 of file dom.hpp.

template<class Card >
PropCost Gecode::Int::GCC::Dom< Card >::cost ( const Space home,
const ModEventDelta med 
) const
virtual

Cost function.

Implements Gecode::Propagator.

Definition at line 107 of file dom.hpp.

template<class Card >
ExecStatus Gecode::Int::GCC::Dom< Card >::propagate ( Space home,
const ModEventDelta med 
)
virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 113 of file dom.hpp.

template<class Card >
size_t Gecode::Int::GCC::Dom< Card >::dispose ( Space home)
inlinevirtual

Destructor.

Reimplemented from Gecode::Actor.

Definition at line 92 of file dom.hpp.

template<class Card >
ExecStatus Gecode::Int::GCC::Dom< Card >::post ( Home  home,
ViewArray< IntView > &  x,
ViewArray< Card > &  k 
)
inlinestatic

Post propagator for views x and cardinalities k.

Definition at line 296 of file dom.hpp.

Member Data Documentation

template<class Card>
ViewArray<IntView> Gecode::Int::GCC::Dom< Card >::x
protected

Views on which to perform domain-propagation.

Definition at line 222 of file gcc.hh.

template<class Card>
ViewArray<IntView> Gecode::Int::GCC::Dom< Card >::y
protected

Views used to channel information between x and k ( $ x \subseteq y $).

Definition at line 227 of file gcc.hh.

template<class Card>
ViewArray<Card> Gecode::Int::GCC::Dom< Card >::k
protected

Array containing either fixed cardinalities or CardViews.

Definition at line 229 of file gcc.hh.

template<class Card>
VarValGraph<Card>* Gecode::Int::GCC::Dom< Card >::vvg
protected

Propagation is performed on a variable-value graph (used as cache)

Definition at line 231 of file gcc.hh.

template<class Card>
bool Gecode::Int::GCC::Dom< Card >::card_fixed
protected

Stores whether cardinalities are all assigned.

If all cardinalities are assigned the propagation algorithm only has to perform propagation for the upper bounds.

Definition at line 238 of file gcc.hh.


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