Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

Gecode::CpltSetVar Class Reference
[Set variables with complete domain representation]

#include <cpltset.hh>

Inherits Gecode::VarBase< Gecode::CpltSet::CpltSetVarImp >.

List of all members.


Detailed Description

Finite set variable with complete domain representation.

Definition at line 97 of file cpltset.hh.


Value access

unsigned int glbSize (void) const
 Return the size of the greatest lower bound.
unsigned int lubSize (void) const
 Return the size of the least upper bound.
unsigned int unknownSize (void) const
 Return the size of lub-glb.
unsigned int cardMin (void) const
 Return current cardinality minimum.
unsigned int cardMax (void) const
 Return current cardinality maximum.
int lubMin (void) const
 Return minimum of the least upper bound.
int lubMax (void) const
 Return maximum of the least upper bound.
int glbMin (void) const
 Return minimum of the greatest lower bound.
int glbMax (void) const
 Return maximum of the 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 share, CpltSetVar &x)
 Update this variable to be a clone of variable x.

Public Member Functions

 CpltSetVar (void)
 Default constructor.
void dispose (Space *home)
 Deallocate memory.
GECODE_CPLTSET_EXPORT CpltSetVar (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.
void init (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.
GECODE_CPLTSET_EXPORT CpltSetVar (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.
void init (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.
GECODE_CPLTSET_EXPORT CpltSetVar (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.
void init (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.
GECODE_CPLTSET_EXPORT CpltSetVar (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.
void init (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.

Related Functions

(Note that these are not member functions.)

GECODE_CPLTSET_EXPORT
std::ostream & 
operator<< (std::ostream &, const Gecode::CpltSetVar &x)
 Print bdd variable x.

Constructor & Destructor Documentation

Gecode::CpltSetVar::CpltSetVar ( void   )  [inline]

Default constructor.

Definition at line 42 of file cpltset.icc.

Gecode::CpltSetVar::CpltSetVar ( 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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 42 of file cpltset.cc.

Gecode::CpltSetVar::CpltSetVar ( 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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 58 of file cpltset.cc.

Gecode::CpltSetVar::CpltSetVar ( 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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 73 of file cpltset.cc.

Gecode::CpltSetVar::CpltSetVar ( 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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 86 of file cpltset.cc.


Member Function Documentation

void Gecode::CpltSetVar::dispose ( Space home  )  [inline]

Deallocate memory.

Definition at line 82 of file cpltset.icc.

void Gecode::CpltSetVar::init ( Space home,
int  glbMin,
int  glbMax,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
) [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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 45 of file cpltset.icc.

void Gecode::CpltSetVar::init ( Space home,
const IntSet glbD,
int  lubMin,
int  lubMax,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
) [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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 65 of file cpltset.icc.

void Gecode::CpltSetVar::init ( Space home,
int  glbMin,
int  glbMax,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
) [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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 56 of file cpltset.icc.

void Gecode::CpltSetVar::init ( Space home,
const IntSet glbD,
const IntSet lubD,
unsigned int  cardMin = 0,
unsigned int  cardMax = Set::Limits::card 
) [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:

  • If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
  • If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
  • If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.

Definition at line 74 of file cpltset.icc.

unsigned int Gecode::CpltSetVar::glbSize ( void   )  const [inline]

Return the size of the greatest lower bound.

Definition at line 120 of file cpltset.icc.

unsigned int Gecode::CpltSetVar::lubSize ( void   )  const [inline]

Return the size of the least upper bound.

Definition at line 123 of file cpltset.icc.

unsigned int Gecode::CpltSetVar::unknownSize ( void   )  const [inline]

Return the size of lub-glb.

Definition at line 126 of file cpltset.icc.

unsigned int Gecode::CpltSetVar::cardMin ( void   )  const [inline]

Return current cardinality minimum.

Definition at line 102 of file cpltset.icc.

unsigned int Gecode::CpltSetVar::cardMax ( void   )  const [inline]

Return current cardinality maximum.

Definition at line 105 of file cpltset.icc.

int Gecode::CpltSetVar::lubMin ( void   )  const [inline]

Return minimum of the least upper bound.

Definition at line 108 of file cpltset.icc.

int Gecode::CpltSetVar::lubMax ( void   )  const [inline]

Return maximum of the least upper bound.

Definition at line 111 of file cpltset.icc.

int Gecode::CpltSetVar::glbMin ( void   )  const [inline]

Return minimum of the greatest lower bound.

Definition at line 114 of file cpltset.icc.

int Gecode::CpltSetVar::glbMax ( void   )  const [inline]

Return maximum of the greatest lower bound.

Definition at line 117 of file cpltset.icc.

bool Gecode::CpltSetVar::contains ( int  i  )  const [inline]

Test whether i is in greatest lower bound.

Definition at line 88 of file cpltset.icc.

bool Gecode::CpltSetVar::notContains ( int  i  )  const [inline]

Test whether i is not in the least upper bound.

Definition at line 91 of file cpltset.icc.

bool Gecode::CpltSetVar::assigned ( void   )  const [inline]

Test whether this variable is assigned.

Definition at line 94 of file cpltset.icc.

void Gecode::CpltSetVar::update ( Space home,
bool  share,
CpltSetVar x 
) [inline]

Update this variable to be a clone of variable x.

Definition at line 97 of file cpltset.icc.


Friends And Related Function Documentation

GECODE_CPLTSET_EXPORT std::ostream & operator<< ( std::ostream &  ,
const Gecode::CpltSetVar x 
) [related]

Print bdd variable x.

Definition at line 161 of file print.cc.


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