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 . | |
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 . | |
ProjectorSet | Gecode::Formula::projectors (void) |
Extract projectors from formula. |
Enumeration Type Documentation
enum Gecode::SetExprCode::Instruction [inherited] |
Instructions for set-valued expression code.
- Enumerator:
Definition at line 69 of file projectors.hh.
enum Gecode::SetExpr::RelType [inherited] |
Function Documentation
Gecode::SetExprCode::Stream::Stream | ( | void | ) | [inline, inherited] |
void Gecode::SetExprCode::Stream::add | ( | int | i | ) | [inline, inherited] |
int Gecode::SetExprCode::Stream::size | ( | void | ) | const [inline, inherited] |
int Gecode::SetExprCode::Stream::operator[] | ( | int | i | ) | const [inline, inherited] |
Gecode::SetExprCode::SetExprCode | ( | void | ) | [inline, inherited] |
Gecode::SetExprCode::SetExprCode | ( | const Stream & | s | ) | [inline, inherited] |
Gecode::SetExprCode::SetExprCode | ( | const SetExprCode & | sc | ) | [inline, inherited] |
void Gecode::SetExprCode::update | ( | Space * | home, | |
bool | share, | |||
SetExprCode & | sc | |||
) | [inline, inherited] |
int Gecode::SetExprCode::size | ( | void | ) | const [inline, inherited] |
int Gecode::SetExprCode::operator[] | ( | int | i | ) | const [inline, inherited] |
Gecode::SetExpr::SetExpr | ( | void | ) | [inline, inherited] |
Gecode::SetExpr::SetExpr | ( | const SetExpr & | s | ) | [inherited] |
Gecode::SetExpr::SetExpr | ( | var_idx | v | ) | [inherited] |
Gecode::SetExpr::SetExpr | ( | const SetExpr & | s, | |
int | sign | |||
) | [inherited] |
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] |
int Gecode::SetExpr::arity | ( | void | ) | const [inherited] |
SetExprCode Gecode::SetExpr::encode | ( | void | ) | const [inherited] |
Gecode::SetExpr::~SetExpr | ( | void | ) | [inherited] |
Gecode::Projector::Projector | ( | void | ) | [inline, inherited] |
Gecode::Projector::Projector | ( | SetExpr::var_idx | x, | |
const SetExpr & | sglb, | |||
const SetExpr & | slub | |||
) | [inline, inherited] |
void Gecode::Projector::scope | ( | Support::DynamicArray< int > & | scope | ) | const [inherited] |
int Gecode::Projector::arity | ( | void | ) | const [inherited] |
ExecStatus Gecode::Projector::propagate | ( | Space * | home, | |
ViewArray< Set::SetView > & | x | |||
) | [inline, inherited] |
ExecStatus Gecode::Projector::check | ( | Space * | home, | |
ViewArray< Set::SetView > & | x | |||
) | [inherited] |
unsigned int Gecode::Projector::glbSize | ( | ViewArray< Set::SetView > & | x | ) | [inline, inherited] |
unsigned int Gecode::Projector::lubSize | ( | ViewArray< Set::SetView > & | x | ) | [inline, inherited] |
const SetExprCode & Gecode::Projector::getGlb | ( | void | ) | const [inline, inherited] |
const SetExprCode & Gecode::Projector::getLub | ( | void | ) | const [inline, inherited] |
int Gecode::Projector::getIdx | ( | void | ) | const [inline, inherited] |
Gecode::ProjectorSet::ProjectorSet | ( | void | ) | [inline, inherited] |
Gecode::ProjectorSet::ProjectorSet | ( | int | n | ) | [inline, inherited] |
void Gecode::ProjectorSet::update | ( | Space * | home, | |
bool | share, | |||
ProjectorSet & | p | |||
) | [inline, inherited] |
void Gecode::ProjectorSet::add | ( | const Projector & | p | ) | [inherited] |
int Gecode::ProjectorSet::arity | ( | void | ) | const [inline, inherited] |
void Gecode::ProjectorSet::scope | ( | Support::DynamicArray< int > & | scope, | |
unsigned int | size | |||
) | const [inherited] |
ExecStatus Gecode::ProjectorSet::propagate | ( | Space * | home, | |
ViewArray< Set::SetView > & | x | |||
) | [inline, inherited] |
ExecStatus Gecode::ProjectorSet::check | ( | Space * | home, | |
ViewArray< Set::SetView > & | x | |||
) | [inherited] |
int Gecode::ProjectorSet::size | ( | void | ) | const [inline, inherited] |
const Projector & Gecode::ProjectorSet::operator[] | ( | int | i | ) | const [inline, inherited] |
Gecode::Formula::Formula | ( | const Formula & | f | ) | [inherited] |
const Formula & Gecode::Formula::operator= | ( | const Formula & | f | ) | [inherited] |
Gecode::Formula::~Formula | ( | void | ) | [inherited] |
Gecode::Formula::Formula | ( | int | var | ) | [inherited] |
Gecode::Formula::Formula | ( | bool | b | ) | [inherited] |
Construct constant formula.
Gecode::Formula::Formula | ( | const Formula & | f, | |
int | sign | |||
) | [inherited] |
ProjectorSet Gecode::Formula::projectors | ( | void | ) | [inherited] |
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.