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

Gecode::CpltSet::CpltSetVarImp Class Reference
[Other available functionality]

List of all members.


Detailed Description

Finite integer set variable implementation using a complete domain representation.

Definition at line 136 of file var-imp.icc.


Set bounds update by value

ModEvent exclude (Space *home, int v)
 Exclude value v from lub.
GECODE_CPLTSET_EXPORT ModEvent exclude (Space *home, int a, int b)
 Exclude range $ [a,\dots, b] $ from.
ModEvent include (Space *home, int v)
 Include value v in glb.
GECODE_CPLTSET_EXPORT ModEvent include (Space *home, int a, int b)
 Include range $ [a,\dots, b] $ in glb.
ModEvent intersect (Space *home, int i)
 Intersect domain with singleton set $ \{i\} $.
GECODE_CPLTSET_EXPORT ModEvent intersect (Space *home, int a, int b)
 Intersect domain with range $ [a..b] $.

Set bounds update by range iterator

template<class I>
ModEvent intersectI (Space *home, I &i)
 Intersect domain with range sequence described by i.
template<class I>
ModEvent excludeI (Space *home, I &i)
 Exclude set described by range sequence i from lub.
template<class I>
ModEvent includeI (Space *home, I &i)
 Include set described by range list i in glb.

Set cardinality update

GECODE_CPLTSET_EXPORT ModEvent cardinality (Space *home, int l, int u)
 Restrict cardinality to be at least l and at most u.
ModEvent cardMin (Space *home, unsigned int n)
 Restrict cardinality to be at least n.
ModEvent cardMax (Space *home, unsigned int n)
 Restrict cardinality to be at most n.

Set domain update by value

ModEvent nq (Space *home, int v)
 Restrict domain values to be different from singleton set $\{v\}$.
GECODE_CPLTSET_EXPORT ModEvent nq (Space *home, int a, int b)
 Restrict domain values to be different from range $[a,b]$.
ModEvent eq (Space *home, int v)
 Restrict domain to be equal to singleton set $\{v\}$.
GECODE_CPLTSET_EXPORT ModEvent eq (Space *home, int a, int b)
 Restrict domain to be equal to range $[a,b]$.

Set domain update by range iterator

template<class I>
ModEvent nqI (Space *home, I &i)
 Restrict domain values to be different from set described by i.
template<class I>
ModEvent eqI (Space *home, I &i)
 Restrict domain to be equal to the range sequence i.

Set domain update by bdd

GECODE_CPLTSET_EXPORT ModEvent intersect (Space *home, bdd &d)
 Intersect domain with the domain represented by d.

Value access

unsigned int cardMin (void) const
 Return current cardinality minimum.
unsigned int cardMax (void) const
 Return current cardinality maximum.
GECODE_CPLTSET_EXPORT int glbMin (void) const
 Return minimum of the greatest lower bound.
GECODE_CPLTSET_EXPORT int glbMax (void) const
 Return maximum of the greatest lower bound.
GECODE_CPLTSET_EXPORT unsigned int glbSize (void) const
 Return the size of the greatest lower bound.
GECODE_CPLTSET_EXPORT int lubMin (void) const
 Return minimum of the least upper bound.
GECODE_CPLTSET_EXPORT int lubMax (void) const
 Return maximum of the least upper bound.
GECODE_CPLTSET_EXPORT unsigned int lubSize (void) const
 Return the size of the least upper bound.
GECODE_CPLTSET_EXPORT int lubMinN (int n) const
 Return n -th smallest element in the least upper bound.
GECODE_CPLTSET_EXPORT int lubMaxN (int n) const
 Return n -th largest element in the least upper bound.
GECODE_CPLTSET_EXPORT int unknownMin (void) const
 Return minimum of the difference between the greatest lower and the least upper bound.
GECODE_CPLTSET_EXPORT int unknownMax (void) const
 Return maximum of the difference between the greatest lower and the least upper bound.
GECODE_CPLTSET_EXPORT unsigned int unknownSize (void) const
 Return the size of the difference between the greatest lower and the least upper bound.

Bdd information

int initialLubMin (void) const
 Return the initial minimum of the least upper bound.
int initialLubMax (void) const
 Return the initial maximum of the least upper bound.
unsigned int tableWidth (void) const
 Return the number of bdd variables allocated for this variable (initialLubMax-initialLubMin).
unsigned int offset (void) const
 Return the offset in the global bdd table where the variable's domain starts.
bdd element (int i) const
 Return bdd for the i -th element of this variable (counting from initialLubMin).
bdd elementNeg (int i) const
 Return negated bdd for the i -th element of this variable (counting from initialLubMin).
bdd dom (void) const
 Return the bdd representing the current domain.

Domain tests

GECODE_CPLTSET_EXPORT bool assigned (void)
 Test whether variable is assigned.
GECODE_CPLTSET_EXPORT bool knownIn (int i) const
 Test whether i is contained in the greatest lower bound.
GECODE_CPLTSET_EXPORT bool knownOut (int i) const
 Test whether i is not contained in the least upper bound.
bool range (void) const
 Test whether domain is a range.

Dependencies

void subscribe (Space *home, Propagator *p, PropCond pc, bool process=true)
 Subscribe propagator p with propagation condition pc to variable.
void cancel (Space *home, Propagator *p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc.

Cloning

CpltSetVarImpcopy (Space *home, bool share)
 Return copy of this variable.

Reflection

GECODE_CPLTSET_EXPORT
Reflection::Arg
spec (const Space *home, Reflection::VarMap &m) const

Delta information for advisors

static ModEvent modevent (const Delta *d)
 Return modification event.

Public Member Functions

void printdom (void) const
GECODE_CPLTSET_EXPORT CpltSetVarImp (Space *home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin, unsigned int cardMax)
 Construct variable with given domain.
GECODE_CPLTSET_EXPORT CpltSetVarImp (Space *home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin, unsigned int cardMax)
 Construct variable with given domain.
GECODE_CPLTSET_EXPORT CpltSetVarImp (Space *home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin, unsigned int cardMax)
 Construct variable with given domain.
GECODE_CPLTSET_EXPORT CpltSetVarImp (Space *home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin, unsigned int cardMax)
 Construct variable with given domain.
GECODE_CPLTSET_EXPORT void dispose (Space *home)

Static Public Attributes

static const int MAX_OF_EMPTY = Gecode::Set::Limits::min-1
 Returned by empty sets when asked for their maximum element.
static const int MIN_OF_EMPTY = Gecode::Set::Limits::max+1
 Returned by empty sets when asked for their minimum element.

Protected Member Functions

GECODE_CPLTSET_EXPORT CpltSetVarImp (Space *home, bool share, CpltSetVarImp &x)
 Constructor for cloning x.
template<class I>
bdd iterToBdd (I &i)
 Produce bdd representing i for this variable.

Constructor & Destructor Documentation

Gecode::CpltSet::CpltSetVarImp::CpltSetVarImp ( Space home,
bool  share,
CpltSetVarImp x 
) [protected]

Constructor for cloning x.

Definition at line 181 of file cpltset.cc.

Gecode::CpltSet::CpltSetVarImp::CpltSetVarImp ( Space home,
int  glbMin,
int  glbMax,
int  lubMin,
int  lubMax,
unsigned int  cardMin,
unsigned int  cardMax 
)

Construct variable with given domain.

Definition at line 42 of file cpltset.cc.

Gecode::CpltSet::CpltSetVarImp::CpltSetVarImp ( Space home,
const IntSet glbD,
int  lubMin,
int  lubMax,
unsigned int  cardMin,
unsigned int  cardMax 
)

Construct variable with given domain.

Definition at line 107 of file cpltset.cc.

Gecode::CpltSet::CpltSetVarImp::CpltSetVarImp ( Space home,
int  glbMin,
int  glbMax,
const IntSet lubD,
unsigned int  cardMin,
unsigned int  cardMax 
)

Construct variable with given domain.

Definition at line 66 of file cpltset.cc.

Gecode::CpltSet::CpltSetVarImp::CpltSetVarImp ( Space home,
const IntSet glbD,
const IntSet lubD,
unsigned int  cardMin,
unsigned int  cardMax 
)

Construct variable with given domain.

Definition at line 135 of file cpltset.cc.


Member Function Documentation

void Gecode::CpltSet::CpltSetVarImp::printdom ( void   )  const [inline]

Definition at line 41 of file cpltset.icc.

template<class I>
bdd Gecode::CpltSet::CpltSetVarImp::iterToBdd ( I &  i  )  [inline, protected]

Produce bdd representing i for this variable.

Definition at line 203 of file cpltset.icc.

void Gecode::CpltSet::CpltSetVarImp::dispose ( Space home  )  [inline]

Definition at line 188 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::exclude ( Space home,
int  v 
) [inline]

Exclude value v from lub.

Definition at line 126 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::exclude ( Space home,
int  a,
int  b 
)

Exclude range $ [a,\dots, b] $ from.

Definition at line 258 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::include ( Space home,
int  v 
) [inline]

Include value v in glb.

Definition at line 121 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::include ( Space home,
int  a,
int  b 
)

Include range $ [a,\dots, b] $ in glb.

Definition at line 275 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::intersect ( Space home,
int  i 
) [inline]

Intersect domain with singleton set $ \{i\} $.

Definition at line 177 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::intersect ( Space home,
int  a,
int  b 
)

Intersect domain with range $ [a..b] $.

Definition at line 307 of file cpltset.cc.

template<class I>
ModEvent Gecode::CpltSet::CpltSetVarImp::intersectI ( Space home,
I &  i 
) [inline]

Intersect domain with range sequence described by i.

Definition at line 183 of file cpltset.icc.

template<class I>
ModEvent Gecode::CpltSet::CpltSetVarImp::excludeI ( Space home,
I &  i 
) [inline]

Exclude set described by range sequence i from lub.

Definition at line 95 of file cpltset.icc.

template<class I>
ModEvent Gecode::CpltSet::CpltSetVarImp::includeI ( Space home,
I &  i 
) [inline]

Include set described by range list i in glb.

Definition at line 132 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::cardinality ( Space home,
int  l,
int  u 
)

Restrict cardinality to be at least l and at most u.

Definition at line 325 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::cardMin ( Space home,
unsigned int  n 
) [inline]

Restrict cardinality to be at least n.

Definition at line 190 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::cardMax ( Space home,
unsigned int  n 
) [inline]

Restrict cardinality to be at most n.

Definition at line 195 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::nq ( Space home,
int  v 
) [inline]

Restrict domain values to be different from singleton set $\{v\}$.

Definition at line 150 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::nq ( Space home,
int  a,
int  b 
)

Restrict domain values to be different from range $[a,b]$.

Definition at line 287 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::eq ( Space home,
int  v 
) [inline]

Restrict domain to be equal to singleton set $\{v\}$.

Definition at line 160 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::eq ( Space home,
int  a,
int  b 
)

Restrict domain to be equal to range $[a,b]$.

Definition at line 297 of file cpltset.cc.

template<class I>
ModEvent Gecode::CpltSet::CpltSetVarImp::nqI ( Space home,
I &  i 
) [inline]

Restrict domain values to be different from set described by i.

Definition at line 154 of file cpltset.icc.

template<class I>
ModEvent Gecode::CpltSet::CpltSetVarImp::eqI ( Space home,
I &  i 
) [inline]

Restrict domain to be equal to the range sequence i.

Definition at line 167 of file cpltset.icc.

ModEvent Gecode::CpltSet::CpltSetVarImp::intersect ( Space home,
bdd &  d 
)

Intersect domain with the domain represented by d.

Definition at line 228 of file cpltset.cc.

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

Return current cardinality minimum.

Definition at line 74 of file cpltset.icc.

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

Return current cardinality maximum.

Definition at line 84 of file cpltset.icc.

int Gecode::CpltSet::CpltSetVarImp::glbMin ( void   )  const

Return minimum of the greatest lower bound.

Definition at line 395 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::glbMax ( void   )  const

Return maximum of the greatest lower bound.

Definition at line 411 of file cpltset.cc.

unsigned int Gecode::CpltSet::CpltSetVarImp::glbSize ( void   )  const

Return the size of the greatest lower bound.

Definition at line 428 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::lubMin ( void   )  const

Return minimum of the least upper bound.

Definition at line 488 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::lubMax ( void   )  const

Return maximum of the least upper bound.

Definition at line 495 of file cpltset.cc.

unsigned int Gecode::CpltSet::CpltSetVarImp::lubSize ( void   )  const

Return the size of the least upper bound.

Definition at line 380 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::lubMinN ( int  n  )  const

Return n -th smallest element in the least upper bound.

Definition at line 508 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::lubMaxN ( int  n  )  const [inline]

Return n -th largest element in the least upper bound.

Definition at line 353 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::unknownMin ( void   )  const

Return minimum of the difference between the greatest lower and the least upper bound.

Definition at line 440 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::unknownMax ( void   )  const

Return maximum of the difference between the greatest lower and the least upper bound.

Definition at line 455 of file cpltset.cc.

unsigned int Gecode::CpltSet::CpltSetVarImp::unknownSize ( void   )  const

Return the size of the difference between the greatest lower and the least upper bound.

Definition at line 473 of file cpltset.cc.

int Gecode::CpltSet::CpltSetVarImp::initialLubMin ( void   )  const [inline]

Return the initial minimum of the least upper bound.

Definition at line 68 of file cpltset.icc.

int Gecode::CpltSet::CpltSetVarImp::initialLubMax ( void   )  const [inline]

Return the initial maximum of the least upper bound.

Definition at line 71 of file cpltset.icc.

unsigned int Gecode::CpltSet::CpltSetVarImp::tableWidth ( void   )  const [inline]

Return the number of bdd variables allocated for this variable (initialLubMax-initialLubMin).

Definition at line 46 of file cpltset.icc.

unsigned int Gecode::CpltSet::CpltSetVarImp::offset ( void   )  const [inline]

Return the offset in the global bdd table where the variable's domain starts.

Definition at line 65 of file cpltset.icc.

bdd Gecode::CpltSet::CpltSetVarImp::element ( int  i  )  const [inline]

Return bdd for the i -th element of this variable (counting from initialLubMin).

Definition at line 49 of file cpltset.icc.

bdd Gecode::CpltSet::CpltSetVarImp::elementNeg ( int  i  )  const [inline]

Return negated bdd for the i -th element of this variable (counting from initialLubMin).

Definition at line 54 of file cpltset.icc.

bdd Gecode::CpltSet::CpltSetVarImp::dom ( void   )  const [inline]

Return the bdd representing the current domain.

Definition at line 60 of file cpltset.icc.

bool Gecode::CpltSet::CpltSetVarImp::assigned ( void   ) 

Test whether variable is assigned.

Definition at line 214 of file cpltset.cc.

bool Gecode::CpltSet::CpltSetVarImp::knownIn ( int  i  )  const

Test whether i is contained in the greatest lower bound.

Definition at line 333 of file cpltset.cc.

bool Gecode::CpltSet::CpltSetVarImp::knownOut ( int  i  )  const

Test whether i is not contained in the least upper bound.

Definition at line 343 of file cpltset.cc.

bool Gecode::CpltSet::CpltSetVarImp::range ( void   )  const [inline]

Test whether domain is a range.

Definition at line 228 of file cpltset.icc.

void Gecode::CpltSet::CpltSetVarImp::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  process = true 
) [inline]

Subscribe propagator p with propagation condition pc to variable.

Definition at line 246 of file cpltset.icc.

void Gecode::CpltSet::CpltSetVarImp::cancel ( Space home,
Propagator p,
PropCond  pc 
) [inline]

Cancel subscription of propagator p with propagation condition pc.

Definition at line 252 of file cpltset.icc.

CpltSetVarImp * Gecode::CpltSet::CpltSetVarImp::copy ( Space home,
bool  share 
) [inline]

Return copy of this variable.

Definition at line 236 of file cpltset.icc.

Reflection::Arg * Gecode::CpltSet::CpltSetVarImp::spec ( const Space home,
Reflection::VarMap m 
) const

Definition at line 206 of file cpltset.cc.

ModEvent Gecode::CpltSet::CpltSetVarImp::modevent ( const Delta d  )  [inline, static]

Return modification event.

Definition at line 261 of file cpltset.icc.


Member Data Documentation

Returned by empty sets when asked for their maximum element.

Definition at line 146 of file var-imp.icc.

Returned by empty sets when asked for their minimum element.

Definition at line 148 of file var-imp.icc.


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