Generated on Sat Feb 7 2015 02:01:41 for Gecode by doxygen 1.8.9.1

Set variables More...

#include <set.hh>

Related Functions

(Note that these are not member functions.)

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const SetVar &x)
 Print set variable x. More...
 

Constructors and initialization

 SetVar (void)
 Default constructor. More...
 
 SetVar (const SetVar &y)
 Initialize from set variable y. More...
 
 SetVar (const Set::SetView &y)
 Initialize from set view y. More...
 
 SetVar (Space &home)
 Initialize variable with empty greatest lower and full least upper bound. More...
 
 SetVar (Space &home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
 Initialize variable with given bounds and cardinality. More...
 
 SetVar (Space &home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
 Initialize variable with given bounds and cardinality. More...
 
 SetVar (Space &home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
 Initialize variable with given bounds and cardinality. More...
 
 SetVar (Space &home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
 Initialize variable with given bounds and cardinality. More...
 

Value access

unsigned int glbSize (void) const
 Return number of elements in the greatest lower bound. More...
 
unsigned int lubSize (void) const
 Return number of elements in the least upper bound. More...
 
unsigned int unknownSize (void) const
 Return number of unknown elements (elements in lub but not in glb) More...
 
unsigned int cardMin (void) const
 Return cardinality minimum. More...
 
unsigned int cardMax (void) const
 Return cardinality maximum. More...
 
int lubMin (void) const
 Return minimum element of least upper bound. More...
 
int lubMax (void) const
 Return maximum element of least upper bound. More...
 
int glbMin (void) const
 Return minimum element of greatest lower bound. More...
 
int glbMax (void) const
 Return maximum of greatest lower bound. More...
 

Domain tests

bool contains (int i) const
 Test whether i is in greatest lower bound. More...
 
bool notContains (int i) const
 Test whether i is not in the least upper bound. More...
 

Additional Inherited Members

- Public Types inherited from Gecode::VarImpVar< Set::SetVarImp >
typedef Set::SetVarImp VarImpType
 The variable implementation type corresponding to the variable. More...
 
- Public Member Functions inherited from Gecode::VarImpVar< Set::SetVarImp >
Set::SetVarImpvarimp (void) const
 Return variable implementation of variable. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors) More...
 
double afc (const Space &home) const
 Return accumulated failure count. More...
 
bool assigned (void) const
 Test whether view is assigned. More...
 
void update (Space &home, bool share, VarImpVar< Set::SetVarImp > &y)
 Update this variable to be a clone of variable y. More...
 
bool same (const VarImpVar< Set::SetVarImp > &y) const
 Test whether variable is the same as y. More...
 
bool before (const VarImpVar< Set::SetVarImp > &y) const
 Test whether variable comes before y (arbitrary order) More...
 
- Protected Member Functions inherited from Gecode::VarImpVar< Set::SetVarImp >
 VarImpVar (void)
 Default constructor. More...
 
 VarImpVar (Set::SetVarImp *y)
 Initialize with variable implementation y. More...
 
- Protected Attributes inherited from Gecode::VarImpVar< Set::SetVarImp >
Set::SetVarImpx
 Pointer to variable implementation. More...
 

Detailed Description

Set variables

Definition at line 129 of file set.hh.

Constructor & Destructor Documentation

Gecode::SetVar::SetVar ( void  )
inline

Default constructor.

Definition at line 50 of file set.hpp.

Gecode::SetVar::SetVar ( const SetVar y)
inline

Initialize from set variable y.

Definition at line 53 of file set.hpp.

Gecode::SetVar::SetVar ( const Set::SetView y)
inline

Initialize from set view y.

Definition at line 57 of file set.hpp.

Gecode::SetVar::SetVar ( Space home)

Initialize variable with empty greatest lower and full least upper bound.

Definition at line 47 of file set.cpp.

Gecode::SetVar::SetVar ( Space home,
int  glbMin,
int  glbMax,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
)

Initialize variable with given bounds and cardinality.

The variable is created with greatest lower bound $\{\mathit{glbMin},\dots,\mathit{glbMax}\}$, least upper bound $\{\mathit{lubMin},\dots,\mathit{lubMax}\}$, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:

Definition at line 50 of file set.cpp.

Gecode::SetVar::SetVar ( Space home,
const IntSet glbD,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
)

Initialize variable with given bounds and cardinality.

The variable is created with greatest lower bound glbD, least upper bound $\{\mathit{lubMin},\dots,\mathit{lubMax}\}$, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:

Definition at line 65 of file set.cpp.

Gecode::SetVar::SetVar ( Space home,
int  glbMin,
int  glbMax,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
)

Initialize variable with given bounds and cardinality.

The variable is created with greatest lower bound $\{\mathit{glbMin},\dots,\mathit{glbMax}\}$, least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:

Definition at line 78 of file set.cpp.

Gecode::SetVar::SetVar ( Space home,
const IntSet glbD,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
)

Initialize variable with given bounds and cardinality.

The variable is created with greatest lower bound glbD, least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:

Definition at line 93 of file set.cpp.

Member Function Documentation

unsigned int Gecode::SetVar::glbSize ( void  ) const
inline

Return number of elements in the greatest lower bound.

Definition at line 67 of file set.hpp.

unsigned int Gecode::SetVar::lubSize ( void  ) const
inline

Return number of elements in the least upper bound.

Definition at line 70 of file set.hpp.

unsigned int Gecode::SetVar::unknownSize ( void  ) const
inline

Return number of unknown elements (elements in lub but not in glb)

Definition at line 73 of file set.hpp.

unsigned int Gecode::SetVar::cardMin ( void  ) const
inline

Return cardinality minimum.

Definition at line 82 of file set.hpp.

unsigned int Gecode::SetVar::cardMax ( void  ) const
inline

Return cardinality maximum.

Definition at line 85 of file set.hpp.

int Gecode::SetVar::lubMin ( void  ) const
inline

Return minimum element of least upper bound.

Definition at line 88 of file set.hpp.

int Gecode::SetVar::lubMax ( void  ) const
inline

Return maximum element of least upper bound.

Definition at line 91 of file set.hpp.

int Gecode::SetVar::glbMin ( void  ) const
inline

Return minimum element of greatest lower bound.

Definition at line 94 of file set.hpp.

int Gecode::SetVar::glbMax ( void  ) const
inline

Return maximum of greatest lower bound.

Definition at line 97 of file set.hpp.

bool Gecode::SetVar::contains ( int  i) const
inline

Test whether i is in greatest lower bound.

Definition at line 76 of file set.hpp.

bool Gecode::SetVar::notContains ( int  i) const
inline

Test whether i is not in the least upper bound.

Definition at line 79 of file set.hpp.

Friends And Related Function Documentation

template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  os,
const SetVar x 
)
related

Print set variable x.

Definition at line 42 of file print.hpp.


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