
Cardinality integer view. More...
#include <view.hpp>
Static Public Attributes | |
| static const bool | propagate = true |
| This view does require propagation. | |
Protected Attributes | |
| int | _card |
| Cardinality. | |
| int | _counter |
| Counter. | |
Initialization | |
| CardView (void) | |
| Default constructor. | |
| void | init (const IntView &y, int c) |
| Initialize with integer view y and value c. | |
| void | init (Space &home, const IntSet &s, int c) |
| Initialize for set s and cardinality c. | |
Value access | |
| int | min (void) const |
| Return minimum of domain. | |
| int | max (void) const |
| Return maximum of domain. | |
| unsigned int | size (void) const |
| Return size (cardinality) of domain. | |
| int | counter (void) const |
| Return the number of times the value occurs. | |
| int | card (void) const |
| Return cardinality. | |
Domain update by value | |
Set the counter to the number of times value n occurs | |
| 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. | |
Domain update by iterator | |
| template<class I > | |
| ModEvent | narrow_v (Space &home, I &i, bool depends=true) |
| Replace domain by values described by i. | |
| template<class I > | |
| ModEvent | inter_v (Space &home, I &i, bool depends=true) |
| Intersect domain with values described by i. | |
| template<class I > | |
| ModEvent | minus_v (Space &home, I &i, bool depends=true) |
| Remove from domain the values described by i. | |
Cloning | |
| void | update (Space &home, bool share, CardView &x) |
| Gecode::Int::GCC::CardView::CardView | ( | void | ) | [inline] |
| void Gecode::Int::GCC::CardView::init | ( | const IntView & | y, |
| int | c | ||
| ) | [inline] |
| void Gecode::Int::GCC::CardView::init | ( | Space & | home, |
| const IntSet & | s, | ||
| int | c | ||
| ) | [inline] |
| int Gecode::Int::GCC::CardView::min | ( | void | ) | const [inline] |
| int Gecode::Int::GCC::CardView::max | ( | void | ) | const [inline] |
| unsigned int Gecode::Int::GCC::CardView::size | ( | void | ) | const [inline] |
| int Gecode::Int::GCC::CardView::counter | ( | void | ) | const [inline] |
| int Gecode::Int::GCC::CardView::card | ( | void | ) | const [inline] |
| void Gecode::Int::GCC::CardView::counter | ( | int | n | ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::inc | ( | void | ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::lq | ( | Space & | home, |
| int | n | ||
| ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::gq | ( | Space & | home, |
| int | n | ||
| ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::eq | ( | Space & | home, |
| int | n | ||
| ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::narrow_v | ( | Space & | home, |
| I & | i, | ||
| bool | depends = true |
||
| ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::inter_v | ( | Space & | home, |
| I & | i, | ||
| bool | depends = true |
||
| ) | [inline] |
| ModEvent Gecode::Int::GCC::CardView::minus_v | ( | Space & | home, |
| I & | i, | ||
| bool | depends = true |
||
| ) | [inline] |
| void Gecode::Int::GCC::CardView::update | ( | Space & | home, |
| bool | share, | ||
| CardView & | x | ||
| ) | [inline] |
int Gecode::Int::GCC::CardView::_card [protected] |
int Gecode::Int::GCC::CardView::_counter [protected] |
const bool Gecode::Int::GCC::CardView::propagate = true [static] |