Generated on Wed Nov 1 15:05:14 2006 for Gecode by doxygen 1.4.5

Gecode::SetVar Class Reference
[Set variables]

List of all members.

Detailed Description

Set variables

Definition at line 663 of file var.icc.

Constructors and initialization

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

Variable implementation access

Set::SetVarImpvariable (void) const
 Return set variable implementation.

Value access

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

Domain tests

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

Cloning

void update (Space *home, bool, SetVar &x)
 Update this variable to be a clone of variable x.

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &, const Gecode::SetVar &x)
 Print set variable x.


Constructor & Destructor Documentation

Gecode::SetVar::SetVar void   )  [inline]
 

Default constructor.

Definition at line 34 of file set.icc.

Gecode::SetVar::SetVar Space home  ) 
 

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

Definition at line 31 of file set.cc.

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

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 34 of file set.cc.

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

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 49 of file set.cc.

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

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 64 of file set.cc.

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

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 79 of file set.cc.


Member Function Documentation

void Gecode::SetVar::init Space home  )  [inline]
 

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

Definition at line 40 of file set.icc.

void Gecode::SetVar::init Space home,
int  glbMin,
int  glbMax,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Limits::Set::card_max
[inline]
 

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 45 of file set.icc.

void Gecode::SetVar::init Space home,
const IntSet glbD,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Limits::Set::card_max
[inline]
 

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 52 of file set.icc.

void Gecode::SetVar::init Space home,
int  glbMin,
int  glbMax,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Limits::Set::card_max
[inline]
 

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 58 of file set.icc.

void Gecode::SetVar::init Space home,
const IntSet glbD,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Limits::Set::card_max
[inline]
 

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 64 of file set.icc.

Set::SetVarImp * Gecode::SetVar::variable void   )  const [inline]
 

Return set variable implementation.

Definition at line 70 of file set.icc.

unsigned int Gecode::SetVar::glbSize void   )  const [inline]
 

Return number of elements in the greatest lower bound.

Definition at line 82 of file set.icc.

unsigned int Gecode::SetVar::lubSize void   )  const [inline]
 

Return number of elements in the least upper bound.

Definition at line 85 of file set.icc.

unsigned int Gecode::SetVar::unknownSize void   )  const [inline]
 

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

Definition at line 88 of file set.icc.

unsigned int Gecode::SetVar::cardMin void   )  const [inline]
 

Return cardinality minimum.

Definition at line 100 of file set.icc.

unsigned int Gecode::SetVar::cardMax void   )  const [inline]
 

Return cardinality maximum.

Definition at line 103 of file set.icc.

int Gecode::SetVar::lubMin void   )  const [inline]
 

Return minimum element of least upper bound.

Definition at line 106 of file set.icc.

int Gecode::SetVar::lubMax void   )  const [inline]
 

Return maximum element of least upper bound.

Definition at line 109 of file set.icc.

int Gecode::SetVar::glbMin void   )  const [inline]
 

Return minimum element of greatest lower bound.

Definition at line 112 of file set.icc.

int Gecode::SetVar::glbMax void   )  const [inline]
 

Return maximum of greatest lower bound.

Definition at line 115 of file set.icc.

bool Gecode::SetVar::contains int  i  )  const [inline]
 

Test whether i is in greatest lower bound.

Definition at line 94 of file set.icc.

bool Gecode::SetVar::notContains int  i  )  const [inline]
 

Test whether i is not in the least upper bound.

Definition at line 97 of file set.icc.

bool Gecode::SetVar::assigned void   )  const [inline]
 

Test whether this variable is assigned.

Definition at line 91 of file set.icc.

void Gecode::SetVar::update Space home,
bool  ,
SetVar x
[inline]
 

Update this variable to be a clone of variable x.

Definition at line 123 of file set.icc.


Friends And Related Function Documentation

std::ostream & operator<< std::ostream &  ,
const Gecode::SetVar x
[related]
 

Print set variable x.

Definition at line 1070 of file view.icc.


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