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

Gecode::Set::SetVarImp Class Reference
[Other available functionality]

Inherits Gecode::Set::SetVarImpBase.

List of all members.


Detailed Description

Finite integer set variable implementation.

Definition at line 463 of file var.icc.

Constructors and initialization

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

Value access

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 lubMinN (int n) const
 Return n -th smallest element in the least upper bound.
int lubMaxN (int n) const
 Return n -th largest element in 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.
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.

Domain tests

bool assigned (void) const
 Test whether variable is assigned.
bool knownIn (int n) const
 Test whether n is contained in greatest lower bound.
bool knownOut (int) const
 Test whether n is not contained in least upper bound.

Domain update by value

ModEvent include (Space *home, int n)
 Include n in the greatest lower bound.
ModEvent include (Space *home, int i, int j)
 Include the range $\{i,\dots,j\}$ in the greatest lower bound.
ModEvent exclude (Space *home, int n)
 Exclude n from the least upper bound.
ModEvent exclude (Space *home, int i, int j)
 Exclude the range $\{i,\dots,j\}$ from the least upper bound.
ModEvent intersect (Space *home, int n)
 Exclude everything but n from the least upper bound.
ModEvent intersect (Space *home, int i, int j)
 Exclude everything but the range $\{i,\dots,j\}$ from the least upper bound.
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.

Domain update by range iterator

template<class I>
ModEvent includeI (Space *home, I &i)
 Include set described by i in the greatest lower bound.
template<class I>
ModEvent excludeI (Space *home, I &i)
 Exclude set described by i from the least upper bound.
template<class I>
ModEvent intersectI (Space *home, I &i)
 Exclude everything but set described by i from the least upper bound.

Dependencies

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

Cloning

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

Protected Member Functions

 SetVarImp (Space *home, bool share, SetVarImp &x)
 Constructor for cloning x.


Constructor & Destructor Documentation

Gecode::Set::SetVarImp::SetVarImp Space home,
bool  share,
SetVarImp x
[inline, protected]
 

Constructor for cloning x.

Definition at line 107 of file imp.cc.

Gecode::Set::SetVarImp::SetVarImp Space home  )  [inline]
 

Initialize with empty lower and full upper bound.

Definition at line 36 of file imp.icc.

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

Initialize with given bounds and cardinality.

Creates a set variable $s$ with $\mathit{glb}(s)=\{\mathit{glbMin},\dots,\mathit{glbMax}\}$ , $\mathit{lub}(s)=\{\mathit{lubMin},\dots,\mathit{lubMax}\}$ , and $\mathit{cardMin}\leq |s|\leq\mathit{cardMax}$

Definition at line 44 of file imp.icc.

Gecode::Set::SetVarImp::SetVarImp Space home,
const IntSet glbD,
int  lubMin,
int  lubMax,
unsigned int  cardMin,
unsigned int  cardMax
[inline]
 

Initialize with given bounds and cardinality.

Creates a set variable $s$ with $\mathit{glb}(s)=\mathit{glbD}$ , $\mathit{lub}(s)=\{\mathit{lubMin},\dots,\mathit{lubMax}\}$ , and $\mathit{cardMin}\leq |s|\leq\mathit{cardMax}$

Definition at line 53 of file imp.icc.

Gecode::Set::SetVarImp::SetVarImp Space home,
int  glbMin,
int  glbMax,
const IntSet lubD,
unsigned int  cardMin,
unsigned int  cardMax
[inline]
 

Initialize with given bounds and cardinality.

Creates a set variable $s$ with $\mathit{glb}(s)=\{\mathit{glbMin},\dots,\mathit{glbMax}\}$ , $\mathit{lub}(s)=\mathit{lubD}$ , and $\mathit{cardMin}\leq |s|\leq\mathit{cardMax}$

Definition at line 63 of file imp.icc.

Gecode::Set::SetVarImp::SetVarImp Space home,
const IntSet glbD,
const IntSet lubD,
unsigned int  cardMin,
unsigned int  cardMax
[inline]
 

Initialize with given bounds and cardinality.

Creates a set variable $s$ with $\mathit{glb}(s)=\mathit{glbD}$ , $\mathit{lub}(s)=\mathit{lubD}$ , and $\mathit{cardMin}\leq |s|\leq\mathit{cardMax}$

Definition at line 73 of file imp.icc.


Member Function Documentation

unsigned int Gecode::Set::SetVarImp::cardMin void   )  const [inline]
 

Return current cardinality minimum.

Definition at line 100 of file imp.icc.

unsigned int Gecode::Set::SetVarImp::cardMax void   )  const [inline]
 

Return current cardinality maximum.

Definition at line 103 of file imp.icc.

int Gecode::Set::SetVarImp::lubMin void   )  const [inline]
 

Return minimum of the least upper bound.

Definition at line 112 of file imp.icc.

int Gecode::Set::SetVarImp::lubMax void   )  const [inline]
 

Return maximum of the least upper bound.

Definition at line 115 of file imp.icc.

int Gecode::Set::SetVarImp::lubMinN int  n  )  const [inline]
 

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

Definition at line 118 of file imp.icc.

int Gecode::Set::SetVarImp::lubMaxN int  n  )  const [inline]
 

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

Definition at line 121 of file imp.icc.

int Gecode::Set::SetVarImp::glbMin void   )  const [inline]
 

Return minimum of the greatest lower bound.

Definition at line 124 of file imp.icc.

int Gecode::Set::SetVarImp::glbMax void   )  const [inline]
 

Return maximum of the greatest lower bound.

Definition at line 127 of file imp.icc.

unsigned int Gecode::Set::SetVarImp::glbSize void   )  const [inline]
 

Return the size of the greatest lower bound.

Definition at line 130 of file imp.icc.

unsigned int Gecode::Set::SetVarImp::lubSize void   )  const [inline]
 

Return the size of the least upper bound.

Definition at line 133 of file imp.icc.

bool Gecode::Set::SetVarImp::assigned void   )  const [inline]
 

Test whether variable is assigned.

Definition at line 95 of file imp.icc.

bool Gecode::Set::SetVarImp::knownIn int  n  )  const [inline]
 

Test whether n is contained in greatest lower bound.

Definition at line 106 of file imp.icc.

bool Gecode::Set::SetVarImp::knownOut int   )  const [inline]
 

Test whether n is not contained in least upper bound.

Definition at line 109 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::include Space home,
int  n
[inline]
 

Include n in the greatest lower bound.

Definition at line 213 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::include Space home,
int  i,
int  j
[inline]
 

Include the range $\{i,\dots,j\}$ in the greatest lower bound.

Definition at line 218 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::exclude Space home,
int  n
[inline]
 

Exclude n from the least upper bound.

Definition at line 223 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::exclude Space home,
int  i,
int  j
[inline]
 

Exclude the range $\{i,\dots,j\}$ from the least upper bound.

Definition at line 228 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::intersect Space home,
int  n
[inline]
 

Exclude everything but n from the least upper bound.

Definition at line 197 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::intersect Space home,
int  i,
int  j
[inline]
 

Exclude everything but the range $\{i,\dots,j\}$ from the least upper bound.

Definition at line 186 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::cardMin Space home,
unsigned int  n
[inline]
 

Restrict cardinality to be at least n.

Definition at line 146 of file imp.icc.

ModEvent Gecode::Set::SetVarImp::cardMax Space home,
unsigned int  n
[inline]
 

Restrict cardinality to be at most n.

Definition at line 156 of file imp.icc.

template<class I>
ModEvent Gecode::Set::SetVarImp::includeI Space home,
I &  i
[inline]
 

Include set described by i in the greatest lower bound.

Definition at line 202 of file imp.icc.

template<class I>
ModEvent Gecode::Set::SetVarImp::excludeI Space home,
I &  i
 

Exclude set described by i from the least upper bound.

Definition at line 166 of file imp.icc.

template<class I>
ModEvent Gecode::Set::SetVarImp::intersectI Space home,
I &  i
[inline]
 

Exclude everything but set described by i from the least upper bound.

Definition at line 176 of file imp.icc.

void Gecode::Set::SetVarImp::subscribe Space home,
Propagator p,
PropCond  pc,
bool  process = true
[inline]
 

Subscribe propagator p with propagation condition pc to variable.

In case process is false, the propagator is just subscribed but not processed for execution (this must be used when creating subscriptions during propagation).

Definition at line 348 of file imp.icc.

SetVarImp * Gecode::Set::SetVarImp::copy Space home,
bool  share
[inline]
 

Return copy of this variable.

Definition at line 262 of file imp.icc.


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