Generated on Sat Feb 7 2015 02:01:47 for Gecode by doxygen 1.8.9.1
Gecode::Int::GCC::CardView Class Reference

Cardinality integer view. More...

#include <view.hpp>

Static Public Attributes

static const bool propagate = true
 This view does require propagation. More...
 

Protected Attributes

int _card
 Cardinality. More...
 
int _counter
 Counter. More...
 
- Protected Attributes inherited from Gecode::DerivedView< IntView >
IntView x
 View from which this view is derived. More...
 

Initialization

 CardView (void)
 Default constructor. More...
 
void init (const IntView &y, int c)
 Initialize with integer view y and value c. More...
 
void init (Space &home, const IntSet &s, int c)
 Initialize for set s and cardinality c. More...
 

Value access

int min (void) const
 Return minimum of domain. More...
 
int max (void) const
 Return maximum of domain. More...
 
unsigned int size (void) const
 Return size (cardinality) of domain. More...
 
int counter (void) const
 Return the number of times the value occurs. More...
 
int card (void) const
 Return cardinality. More...
 

Domain update by value

Set the counter to the number of times value n occurs

void counter (int n)
 Increment counter. More...
 
ModEvent inc (void)
 Increment counter. More...
 
ModEvent lq (Space &home, int n)
 Restrict domain values to be less or equal than n. More...
 
ModEvent gq (Space &home, int n)
 Restrict domain values to be greater or equal than n. More...
 
ModEvent eq (Space &home, int n)
 Restrict domain values to be equal to n. More...
 

Domain update by iterator

template<class I >
ModEvent narrow_v (Space &home, I &i, bool depends=true)
 Replace domain by values described by i. More...
 
template<class I >
ModEvent inter_v (Space &home, I &i, bool depends=true)
 Intersect domain with values described by i. More...
 
template<class I >
ModEvent minus_v (Space &home, I &i, bool depends=true)
 Remove from domain the values described by i. More...
 

Cloning

Update this view to be a clone of view x

void update (Space &home, bool share, CardView &x)
 

Additional Inherited Members

- Public Types inherited from Gecode::DerivedView< IntView >
typedef IntView::VarImpType VarImpType
 The variable implementation type belonging to the View. More...
 
typedef IntView::VarType VarType
 The variable type belonging to the View. More...
 
- Public Member Functions inherited from Gecode::DerivedView< IntView >
VarImpTypevarimp (void) const
 Return variable implementation of view. More...
 
IntView base (void) const
 Return view from which this view is derived. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators) More...
 
double afc (const Space &home) const
 Return accumulated failure count. More...
 
bool assigned (void) const
 Test whether view is assigned. More...
 
void subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
 Subscribe propagator p with propagation condition pc to view. More...
 
void subscribe (Space &home, Advisor &a)
 Subscribe advisor a to view. More...
 
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc to view. More...
 
void cancel (Space &home, Advisor &a)
 Cancel subscription of advisor a. More...
 
void update (Space &home, bool share, DerivedView< IntView > &y)
 Update this view to be a clone of view y. More...
 
- Static Public Member Functions inherited from Gecode::DerivedView< IntView >
static bool varderived (void)
 Return whether this view is derived from a VarImpView. More...
 
static void schedule (Space &home, Propagator &p, ModEvent me)
 Schedule propagator p with modification event me. More...
 
static ModEvent me (const ModEventDelta &med)
 Return modification event for view type in med. More...
 
static ModEventDelta med (ModEvent)
 Translate modification event me to modification event delta for view. More...
 
static ModEvent modevent (const Delta &d)
 Return modification event. More...
 
- Protected Member Functions inherited from Gecode::DerivedView< IntView >
 DerivedView (void)
 Default constructor. More...
 
 DerivedView (const IntView &y)
 Initialize with view y. More...
 

Detailed Description

Cardinality integer view.

Definition at line 141 of file view.hpp.

Constructor & Destructor Documentation

Gecode::Int::GCC::CardView::CardView ( void  )
inline

Default constructor.

Definition at line 296 of file view.hpp.

Member Function Documentation

void Gecode::Int::GCC::CardView::init ( const IntView y,
int  c 
)
inline

Initialize with integer view y and value c.

Definition at line 298 of file view.hpp.

void Gecode::Int::GCC::CardView::init ( Space home,
const IntSet s,
int  c 
)
inline

Initialize for set s and cardinality c.

Definition at line 302 of file view.hpp.

int Gecode::Int::GCC::CardView::min ( void  ) const
inline

Return minimum of domain.

Definition at line 315 of file view.hpp.

int Gecode::Int::GCC::CardView::max ( void  ) const
inline

Return maximum of domain.

Definition at line 319 of file view.hpp.

unsigned int Gecode::Int::GCC::CardView::size ( void  ) const
inline

Return size (cardinality) of domain.

Definition at line 323 of file view.hpp.

int Gecode::Int::GCC::CardView::counter ( void  ) const
inline

Return the number of times the value occurs.

Definition at line 307 of file view.hpp.

int Gecode::Int::GCC::CardView::card ( void  ) const
inline

Return cardinality.

Definition at line 311 of file view.hpp.

void Gecode::Int::GCC::CardView::counter ( int  n)
inline

Increment counter.

Definition at line 328 of file view.hpp.

ModEvent Gecode::Int::GCC::CardView::inc ( void  )
inline

Increment counter.

Definition at line 332 of file view.hpp.

ModEvent Gecode::Int::GCC::CardView::lq ( Space home,
int  n 
)
inline

Restrict domain values to be less or equal than n.

Definition at line 338 of file view.hpp.

ModEvent Gecode::Int::GCC::CardView::gq ( Space home,
int  n 
)
inline

Restrict domain values to be greater or equal than n.

Definition at line 342 of file view.hpp.

ModEvent Gecode::Int::GCC::CardView::eq ( Space home,
int  n 
)
inline

Restrict domain values to be equal to n.

Definition at line 346 of file view.hpp.

template<class I >
ModEvent Gecode::Int::GCC::CardView::narrow_v ( Space home,
I &  i,
bool  depends = true 
)
inline

Replace domain by values described by i.

Definition at line 352 of file view.hpp.

template<class I >
ModEvent Gecode::Int::GCC::CardView::inter_v ( Space home,
I &  i,
bool  depends = true 
)
inline

Intersect domain with values described by i.

Definition at line 357 of file view.hpp.

template<class I >
ModEvent Gecode::Int::GCC::CardView::minus_v ( Space home,
I &  i,
bool  depends = true 
)
inline

Remove from domain the values described by i.

Definition at line 362 of file view.hpp.

void Gecode::Int::GCC::CardView::update ( Space home,
bool  share,
CardView x 
)
inline

Definition at line 367 of file view.hpp.

Member Data Documentation

int Gecode::Int::GCC::CardView::_card
protected

Cardinality.

Definition at line 145 of file view.hpp.

int Gecode::Int::GCC::CardView::_counter
protected

Counter.

Definition at line 147 of file view.hpp.

const bool Gecode::Int::GCC::CardView::propagate = true
static

This view does require propagation.

Definition at line 150 of file view.hpp.


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