Constant view containing lower and upper cardinality bounds. More...
#include <view.hpp>
Public Member Functions | |
IntView | base (void) const |
Return used IntView (cannot be used) | |
Static Public Attributes | |
static const bool | propagate = false |
This view does not require propagation. | |
Initialization | |
CardConst (void) | |
Default constructor. | |
void | init (Space &home, int min, int max, int c) |
Initialize with min, max, and cardinality c. | |
Value access | |
int | min (void) const |
Return minimum of domain. | |
int | max (void) const |
Return maximum of domain. | |
int | card (void) const |
Return cardinality. | |
int | counter (void) const |
Return the number of times the value occurs. | |
Domain tests | |
Test whether view is assigned | |
bool | assigned (void) const |
Domain update by value | |
Set counter to n | |
void | counter (int n) |
Increment counter. | |
ModEvent | inc (void) |
Increment counter. | |
ModEvent | lq (Space &home, int n) |
Restrict domain values to be less or equal than n. | |
ModEvent | gq (Space &home, int n) |
Restrict domain values to be greater or equal than n. | |
ModEvent | eq (Space &home, int n) |
Restrict domain values to be equal to n. | |
Dependencies | |
Subscribe propagator p with propagation condition pc to view | |
void | subscribe (Space &home, Propagator &p, PropCond pc, bool process=true) |
Cancel subscription of propagator p with propagation condition pc to view. | |
void | cancel (Space &home, Propagator &p, PropCond pc) |
Cancel subscription of propagator p with propagation condition pc to view. | |
Cloning | |
void | update (Space &home, bool share, CardConst &x) |
Constant view containing lower and upper cardinality bounds.
Gecode::Int::GCC::CardConst::CardConst | ( | void | ) | [inline] |
void Gecode::Int::GCC::CardConst::init | ( | Space & | home, |
int | min, | ||
int | max, | ||
int | c | ||
) | [inline] |
int Gecode::Int::GCC::CardConst::min | ( | void | ) | const [inline] |
int Gecode::Int::GCC::CardConst::max | ( | void | ) | const [inline] |
int Gecode::Int::GCC::CardConst::card | ( | void | ) | const [inline] |
int Gecode::Int::GCC::CardConst::counter | ( | void | ) | const [inline] |
bool Gecode::Int::GCC::CardConst::assigned | ( | void | ) | const [inline] |
void Gecode::Int::GCC::CardConst::counter | ( | int | n | ) | [inline] |
ModEvent Gecode::Int::GCC::CardConst::inc | ( | void | ) | [inline] |
ModEvent Gecode::Int::GCC::CardConst::lq | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Int::GCC::CardConst::gq | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Int::GCC::CardConst::eq | ( | Space & | home, |
int | n | ||
) | [inline] |
void Gecode::Int::GCC::CardConst::subscribe | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc, | ||
bool | process = true |
||
) | [inline] |
void Gecode::Int::GCC::CardConst::cancel | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc | ||
) | [inline] |
void Gecode::Int::GCC::CardConst::update | ( | Space & | home, |
bool | share, | ||
CardConst & | x | ||
) | [inline] |
IntView Gecode::Int::GCC::CardConst::base | ( | void | ) | const [inline] |
const bool Gecode::Int::GCC::CardConst::propagate = false [static] |