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

Projector constraints
[Using finite integer sets]


Classes

class  Gecode::SetExprCode
 Code representing set-valued expressions for finite set projectors. More...
class  Gecode::SetExprCode::Stream
 To incrementally build up the instructions. More...
class  Gecode::SetExpr
 Set-valued expressions for finite set projectors. More...
class  Gecode::ProjectorSet
 Group of finite set projector specifications. More...
class  Gecode::Formula
 Formulas for specifying set constraints. More...

Construction and initialization

 Gecode::SetExprCode::SetExprCode (void)
 Default constructor.
 Gecode::SetExprCode::SetExprCode (const Stream &s)
 Construct from code Stream.
 Gecode::SetExprCode::SetExprCode (const SetExprCode &sc)
 Copy constructor.

Posting projection propagators

void Gecode::projector (Space *home, const SetVarArgs &xa, ProjectorSet &ps, bool negated=false)
 Post projection propagators for nary constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, ProjectorSet &ps, bool negated=false)
 Post projection propagators for binary constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, const BoolVar &bv, ProjectorSet &ps)
 Post reified projection propagators for binary constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, const SetVar &za, ProjectorSet &ps, bool negated=false)
 Post projection propagators for ternary constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, const SetVar &za, const BoolVar &bv, ProjectorSet &ps)
 Post reified projection propagators for ternary constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, const IntVar &i, Projector &p)
 Post projection propagator for cardinality constraint.
void Gecode::projector (Space *home, const SetVar &xa, const SetVar &ya, const SetVar &za, const IntVar &i, Projector &p)
 Post projection propagator for cardinality constraint.

Enumerations

enum  Gecode::SetExprCode::Instruction {
  Gecode::SetExprCode::COMPLEMENT, Gecode::SetExprCode::INTER, Gecode::SetExprCode::UNION, Gecode::SetExprCode::GLB,
  Gecode::SetExprCode::LUB, Gecode::SetExprCode::EMPTY, Gecode::SetExprCode::UNIVERSE, Gecode::SetExprCode::LAST
}
 Instructions for set-valued expression code. More...
enum  Gecode::SetExpr::RelType { Gecode::SetExpr::REL_INTER, Gecode::SetExpr::REL_UNION }
 Relation used to connect two set expressions. More...

Functions

 Gecode::SetExprCode::Stream::Stream (void)
 Initialize stream to be empty.
void Gecode::SetExprCode::Stream::add (int i)
 Add instruction or variable reference to stream.
int Gecode::SetExprCode::Stream::size (void) const
 Return size of code stream.
int Gecode::SetExprCode::Stream::operator[] (int i) const
 Return instruction at position i.
void Gecode::SetExprCode::update (Space *home, bool share, SetExprCode &sc)
 Copying.
int Gecode::SetExprCode::size (void) const
 Return number of instructions.
int Gecode::SetExprCode::operator[] (int i) const
 Return instruction at position i.
 Gecode::SetExpr::SetExpr (void)
 Construct constant set expression for the empty set.
 Gecode::SetExpr::SetExpr (const SetExpr &s)
 Copy constructor.
 Gecode::SetExpr::SetExpr (var_idx v)
 Construct set expression for variable v.
 Gecode::SetExpr::SetExpr (const SetExpr &s, int sign)
 Construct set expression from s with sign sign.
 Gecode::SetExpr::SetExpr (const SetExpr &s, int ssign, RelType r, const SetExpr &t, int tsign)
 Construct set expression from s with sign ssign and t with sign tsign under relation r.
const SetExpr & Gecode::SetExpr::operator= (const SetExpr &e)
 Assignment operator.
int Gecode::SetExpr::arity (void) const
 Returns the arity of the set expression.
SetExprCode Gecode::SetExpr::encode (void) const
 Returns code for this set expression.
 Gecode::SetExpr::~SetExpr (void)
 Destructor.
 Gecode::Projector::Projector (void)
 Default constructor.
 Gecode::Projector::Projector (SetExpr::var_idx x, const SetExpr &sglb, const SetExpr &slub)
 Construct a projector $(\mathrm{sglb}\subseteq x\subseteq\mathrm{slub})$.
void Gecode::Projector::scope (Support::DynamicArray< int > &scope) const
 Returns the scope of the projector.
int Gecode::Projector::arity (void) const
 Returns the arity of the projector.
template<bool negated>
ExecStatus Gecode::Projector::propagate (Space *home, ViewArray< Set::SetView > &x)
 Propagate the projector.
ExecStatus Gecode::Projector::check (Space *home, ViewArray< Set::SetView > &x)
 Check for subsumption or failure.
unsigned int Gecode::Projector::glbSize (ViewArray< Set::SetView > &x)
 Compute size of greatest lower bound.
unsigned int Gecode::Projector::lubSize (ViewArray< Set::SetView > &x)
 Compute size of least upper bound.
const SetExprCode & Gecode::Projector::getGlb (void) const
 Return the set expression code for the glb.
const SetExprCode & Gecode::Projector::getLub (void) const
 Return the set expression code for the lub.
SetExpr::var_idx Gecode::Projector::getIdx (void) const
 Return the variable index for this projector.
 Gecode::ProjectorSet::ProjectorSet (void)
 Construct empty projector set.
 Gecode::ProjectorSet::ProjectorSet (int n)
 Construct projector set for n projectors.
void Gecode::ProjectorSet::update (Space *home, bool share, ProjectorSet &p)
 Used for copying.
void Gecode::ProjectorSet::add (const Projector &p)
 Add projector p to the set.
int Gecode::ProjectorSet::arity (void) const
 Returns the arity of the projector set.
void Gecode::ProjectorSet::scope (Support::DynamicArray< int > &scope, unsigned int size) const
 Returns the scope of the projector set.
template<bool negated>
ExecStatus Gecode::ProjectorSet::propagate (Space *home, ViewArray< Set::SetView > &x)
 Propagate the set.
ExecStatus Gecode::ProjectorSet::check (Space *home, ViewArray< Set::SetView > &x)
 Check for subsumption or failure.
int Gecode::ProjectorSet::size (void) const
 Return number of projectors int the set.
const Projector & Gecode::ProjectorSet::operator[] (int i) const
 Return projector i from the set.
 Gecode::Formula::Formula (const Formula &f)
 Copy constructor.
const Formula & Gecode::Formula::operator= (const Formula &f)
 Assignment operator.
 Gecode::Formula::~Formula (void)
 Destructor.
 Gecode::Formula::Formula (int var)
 Construct formula for variable var.
 Gecode::Formula::Formula (bool b)
 Construct constant formula.
 Gecode::Formula::Formula (const Formula &f, int sign)
 Construct formula from f with sign s.
 Gecode::Formula::Formula (const Formula &f, int fs, Operator o, const Formula &g, int gs)
 Construct formula for $\mathit{fs}\times f\mathit{o} \mathit{gs}\times g$.
ProjectorSet Gecode::Formula::projectors (void)
 Extract projectors from formula.


Enumeration Type Documentation

Instructions for set-valued expression code.

Enumerator:
COMPLEMENT  Complement.
INTER  Intersection.
UNION  Union.
GLB  Greatest lower bound.
LUB  Least upper bound.
EMPTY  Constant empty set.
UNIVERSE  Constant universal set.
LAST  First integer to use for immediate arguments.

Definition at line 69 of file projectors.hh.

enum Gecode::SetExpr::RelType [inherited]

Relation used to connect two set expressions.

Enumerator:
REL_INTER  Intersection relation.
REL_UNION  Union relation.

Definition at line 128 of file projectors.hh.


Function Documentation

Gecode::SetExprCode::Stream::Stream ( void   )  [inline, inherited]

Initialize stream to be empty.

Definition at line 50 of file set-expr.icc.

void Gecode::SetExprCode::Stream::add ( int  i  )  [inline, inherited]

Add instruction or variable reference to stream.

Definition at line 53 of file set-expr.icc.

int Gecode::SetExprCode::Stream::size ( void   )  const [inline, inherited]

Return size of code stream.

Definition at line 58 of file set-expr.icc.

int Gecode::SetExprCode::Stream::operator[] ( int  i  )  const [inline, inherited]

Return instruction at position i.

Definition at line 63 of file set-expr.icc.

Gecode::SetExprCode::SetExprCode ( void   )  [inline, inherited]

Default constructor.

Definition at line 70 of file set-expr.icc.

Gecode::SetExprCode::SetExprCode ( const Stream s  )  [inline, inherited]

Construct from code Stream.

Definition at line 73 of file set-expr.icc.

Gecode::SetExprCode::SetExprCode ( const SetExprCode sc  )  [inline, inherited]

Copy constructor.

Definition at line 80 of file set-expr.icc.

void Gecode::SetExprCode::update ( Space home,
bool  share,
SetExprCode sc 
) [inline, inherited]

Copying.

Definition at line 83 of file set-expr.icc.

int Gecode::SetExprCode::size ( void   )  const [inline, inherited]

Return number of instructions.

Definition at line 88 of file set-expr.icc.

int Gecode::SetExprCode::operator[] ( int  i  )  const [inline, inherited]

Return instruction at position i.

Definition at line 91 of file set-expr.icc.

Gecode::SetExpr::SetExpr ( void   )  [inline, inherited]

Construct constant set expression for the empty set.

Definition at line 100 of file set-expr.icc.

Gecode::SetExpr::SetExpr ( const SetExpr s  )  [inherited]

Copy constructor.

Definition at line 192 of file set-expr.cc.

Gecode::SetExpr::SetExpr ( var_idx  v  )  [inherited]

Construct set expression for variable v.

Definition at line 179 of file set-expr.cc.

Gecode::SetExpr::SetExpr ( const SetExpr s,
int  sign 
) [inherited]

Construct set expression from s with sign sign.

Definition at line 186 of file set-expr.cc.

Gecode::SetExpr::SetExpr ( const SetExpr s,
int  ssign,
RelType  r,
const SetExpr t,
int  tsign 
) [inherited]

Construct set expression from s with sign ssign and t with sign tsign under relation r.

Definition at line 181 of file set-expr.cc.

const SetExpr & Gecode::SetExpr::operator= ( const SetExpr e  )  [inherited]

Assignment operator.

Definition at line 199 of file set-expr.cc.

int Gecode::SetExpr::arity ( void   )  const [inherited]

Returns the arity of the set expression.

Definition at line 217 of file set-expr.cc.

SetExprCode Gecode::SetExpr::encode ( void   )  const [inherited]

Returns code for this set expression.

Definition at line 222 of file set-expr.cc.

Gecode::SetExpr::~SetExpr ( void   )  [inherited]

Destructor.

Definition at line 211 of file set-expr.cc.

Gecode::Projector::Projector ( void   )  [inline, inherited]

Default constructor.

Definition at line 41 of file projector.icc.

Gecode::Projector::Projector ( SetExpr::var_idx  x,
const SetExpr sglb,
const SetExpr slub 
) [inline, inherited]

Construct a projector $(\mathrm{sglb}\subseteq x\subseteq\mathrm{slub})$.

Definition at line 44 of file projector.icc.

void Gecode::Projector::scope ( Support::DynamicArray< int > &  scope  )  const [inherited]

Returns the scope of the projector.

Definition at line 82 of file projector.cc.

int Gecode::Projector::arity ( void   )  const [inherited]

Returns the arity of the projector.

Definition at line 43 of file projector.cc.

template<bool negated>
ExecStatus Gecode::Projector::propagate ( Space home,
ViewArray< Set::SetView > &  x 
) [inline, inherited]

Propagate the projector.

Definition at line 51 of file projector.icc.

ExecStatus Gecode::Projector::check ( Space home,
ViewArray< Set::SetView > &  x 
) [inherited]

Check for subsumption or failure.

Definition at line 88 of file projector.cc.

unsigned int Gecode::Projector::glbSize ( ViewArray< Set::SetView > &  x  )  [inline, inherited]

Compute size of greatest lower bound.

Definition at line 76 of file projector.icc.

unsigned int Gecode::Projector::lubSize ( ViewArray< Set::SetView > &  x  )  [inline, inherited]

Compute size of least upper bound.

Definition at line 82 of file projector.icc.

const SetExprCode & Gecode::Projector::getGlb ( void   )  const [inline, inherited]

Return the set expression code for the glb.

Definition at line 88 of file projector.icc.

const SetExprCode & Gecode::Projector::getLub ( void   )  const [inline, inherited]

Return the set expression code for the lub.

Definition at line 91 of file projector.icc.

int Gecode::Projector::getIdx ( void   )  const [inline, inherited]

Return the variable index for this projector.

Definition at line 94 of file projector.icc.

Gecode::ProjectorSet::ProjectorSet ( void   )  [inline, inherited]

Construct empty projector set.

Definition at line 41 of file projector-set.icc.

Gecode::ProjectorSet::ProjectorSet ( int  n  )  [inline, inherited]

Construct projector set for n projectors.

Definition at line 44 of file projector-set.icc.

void Gecode::ProjectorSet::update ( Space home,
bool  share,
ProjectorSet p 
) [inline, inherited]

Used for copying.

Definition at line 47 of file projector-set.icc.

void Gecode::ProjectorSet::add ( const Projector p  )  [inherited]

Add projector p to the set.

Definition at line 43 of file projector-set.cc.

int Gecode::ProjectorSet::arity ( void   )  const [inline, inherited]

Returns the arity of the projector set.

Definition at line 54 of file projector-set.icc.

void Gecode::ProjectorSet::scope ( Support::DynamicArray< int > &  scope,
unsigned int  size 
) const [inherited]

Returns the scope of the projector set.

Definition at line 51 of file projector-set.cc.

template<bool negated>
ExecStatus Gecode::ProjectorSet::propagate ( Space home,
ViewArray< Set::SetView > &  x 
) [inline, inherited]

Propagate the set.

Definition at line 58 of file projector-set.icc.

ExecStatus Gecode::ProjectorSet::check ( Space home,
ViewArray< Set::SetView > &  x 
) [inherited]

Check for subsumption or failure.

Definition at line 64 of file projector-set.cc.

int Gecode::ProjectorSet::size ( void   )  const [inline, inherited]

Return number of projectors int the set.

Definition at line 78 of file projector-set.icc.

const Projector & Gecode::ProjectorSet::operator[] ( int  i  )  const [inline, inherited]

Return projector i from the set.

Definition at line 81 of file projector-set.icc.

Gecode::Formula::Formula ( const Formula f  )  [inherited]

Copy constructor.

Definition at line 197 of file formula.cc.

const Formula & Gecode::Formula::operator= ( const Formula f  )  [inherited]

Assignment operator.

Definition at line 204 of file formula.cc.

Gecode::Formula::~Formula ( void   )  [inherited]

Destructor.

Definition at line 216 of file formula.cc.

Gecode::Formula::Formula ( int  var  )  [inherited]

Construct formula for variable var.

Definition at line 184 of file formula.cc.

Gecode::Formula::Formula ( bool  b  )  [inherited]

Construct constant formula.

Gecode::Formula::Formula ( const Formula f,
int  sign 
) [inherited]

Construct formula from f with sign s.

Definition at line 191 of file formula.cc.

Gecode::Formula::Formula ( const Formula f,
int  fs,
Operator  o,
const Formula g,
int  gs 
) [inherited]

Construct formula for $\mathit{fs}\times f\mathit{o} \mathit{gs}\times g$.

Definition at line 186 of file formula.cc.

ProjectorSet Gecode::Formula::projectors ( void   )  [inherited]

Extract projectors from formula.

Definition at line 259 of file formula.cc.

void Gecode::projector ( Space *  home,
const SetVarArgs &  xa,
ProjectorSet &  ps,
bool  negated = false 
)

Post projection propagators for nary constraint.

Post projection propagators for nary constraint on variables x, specified by ps. If negated is true, the negation of the specified constraint is propagated.

Definition at line 61 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
ProjectorSet &  ps,
bool  negated = false 
)

Post projection propagators for binary constraint.

Post projection propagators for binary constraint on variables xa and ya, specified by ps. If negated is true, the negation of the specified constraint is propagated.

Definition at line 44 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
const BoolVar &  bv,
ProjectorSet &  ps 
)

Post reified projection propagators for binary constraint.

Post projection propagators for binary constraint on variables xa and ya, specified by ps, reified with bv.

Definition at line 79 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
const SetVar &  za,
ProjectorSet &  ps,
bool  negated = false 
)

Post projection propagators for ternary constraint.

Post projection propagators for ternary constraint on variables xa, ya and za, specified by ps. If negated is true, the negation of the specified constraint is propagated.

Definition at line 90 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
const SetVar &  za,
const BoolVar &  bv,
ProjectorSet &  ps 
)

Post reified projection propagators for ternary constraint.

Post projection propagators for ternary constraint on variables xa, ya and za, specified by ps, reified with bv.

Definition at line 108 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
const IntVar &  i,
Projector &  p 
)

Post projection propagator for cardinality constraint.

Post propagator for the constraint that i is the cardinality of the set represented by p, interpreted over the variables xa and ya.

Definition at line 120 of file projectors.cc.

void Gecode::projector ( Space *  home,
const SetVar &  xa,
const SetVar &  ya,
const SetVar &  za,
const IntVar &  i,
Projector &  p 
)

Post projection propagator for cardinality constraint.

Post propagator for the constraint that i is the cardinality of the set represented by p, interpreted over the variables xa, ya, and za.

Definition at line 130 of file projectors.cc.