Number of values propagator for integer views base class. More...
#include <nvalues.hh>
Public Member Functions | |
virtual PropCost | cost (const Space &, const ModEventDelta &) const |
Cost function. | |
virtual size_t | dispose (Space &home) |
Delete propagator and return its size. | |
Protected Member Functions | |
IntBase (Home home, ValSet &vs, ViewArray< IntView > &x, VY y) | |
Constructor for posting. | |
IntBase (Space &home, bool share, IntBase< VY > &p) | |
Constructor for cloning p. | |
void | add (Space &home) |
Add values of assigned views to value set. | |
void | disjoint (Space &home, Region &r, int *&dis, int &n_dis) |
void | eliminate (Space &home) |
Eliminate subsumed views (all values included in the value set vs) | |
int | size (Space &home) const |
Return a size estimate based on the union of all values. | |
ExecStatus | all_in_valset (Space &home) |
Propagate that all views must take values from value set. | |
ExecStatus | prune_lower (Space &home, int *dis, int n_dis) |
ExecStatus | prune_upper (Space &home, Graph &g) |
Protected Attributes | |
ValSet | vs |
Value set storing the values of already assigned views. |
Gecode::Int::NValues::IntBase::IntBase | ( | Home | home, |
ValSet & | vs, | ||
ViewArray< IntView > & | x, | ||
VY | y | ||
) | [inline, protected] |
Constructor for posting.
Definition at line 44 of file int-base.hpp.
Gecode::Int::NValues::IntBase::IntBase | ( | Space & | home, |
bool | share, | ||
IntBase< VY > & | p | ||
) | [inline, protected] |
Constructor for cloning p.
Definition at line 50 of file int-base.hpp.
void Gecode::Int::NValues::IntBase::add | ( | Space & | home | ) | [protected] |
Add values of assigned views to value set.
Definition at line 72 of file int-base.hpp.
void Gecode::Int::NValues::IntBase::disjoint | ( | Space & | home, |
Region & | r, | ||
int *& | dis, | ||
int & | n_dis | ||
) | [protected] |
Compute position of disjoint views in dis (with length n_dis) and eliminate subsumed views (all values included in the value set vs).
Definition at line 84 of file int-base.hpp.
void Gecode::Int::NValues::IntBase::eliminate | ( | Space & | home | ) | [protected] |
Eliminate subsumed views (all values included in the value set vs)
Definition at line 111 of file int-base.hpp.
int Gecode::Int::NValues::IntBase::size | ( | Space & | home | ) | const [protected] |
Return a size estimate based on the union of all values.
Definition at line 124 of file int-base.hpp.
ExecStatus Gecode::Int::NValues::IntBase::all_in_valset | ( | Space & | home | ) | [protected] |
Propagate that all views must take values from value set.
Definition at line 145 of file int-base.hpp.
ExecStatus Gecode::Int::NValues::IntBase::prune_lower | ( | Space & | home, |
int * | dis, | ||
int | n_dis | ||
) | [protected] |
Perform pruning of the lower bound based on finding an independent set, where dis and n_dis define the set of disjoint views (not overlapping with the values in the value set).
Changes dis.
Definition at line 155 of file int-base.hpp.
ExecStatus Gecode::Int::NValues::IntBase::prune_upper | ( | Space & | home, |
Graph & | g | ||
) | [inline, protected] |
Perform pruning of the upper bound based on finding a maximal matching in the view value graph g.
Requires that subsumed views have been eliminated.
Definition at line 321 of file int-base.hpp.
PropCost Gecode::Int::NValues::IntBase::cost | ( | const Space & | , |
const ModEventDelta & | |||
) | const [virtual] |
Cost function.
Reimplemented from Gecode::MixNaryOnePropagator< IntView, PC_INT_DOM, VY, PC_INT_BND >.
Definition at line 66 of file int-base.hpp.
size_t Gecode::Int::NValues::IntBase::dispose | ( | Space & | home | ) | [inline, virtual] |
Delete propagator and return its size.
Reimplemented from Gecode::MixNaryOnePropagator< IntView, PC_INT_DOM, VY, PC_INT_BND >.
Reimplemented in Gecode::Int::NValues::LqInt, and Gecode::Int::NValues::EqInt.
Definition at line 57 of file int-base.hpp.
ValSet Gecode::Int::NValues::IntBase::vs [protected] |
Value set storing the values of already assigned views.
Definition at line 142 of file nvalues.hh.