#include <IbexSequence.h>

Public Member Functions | |
| Sequence (const vector< const Contractor * > &vec, Space &, bool logic_op) | |
| Sequence (const CSP &csp) | |
| Sequence (const vector< const Contractor * > &vec) | |
| Sequence (const Sequence &csp) | |
| Sequence (const Contractor &c1, const Contractor &c2) | |
| virtual Sequence * | copy () const |
| virtual void | contract () |
| virtual bool | involves (int ent) const |
| int | nb_var () const |
Public Attributes | |
| const bool | logic_op |
| ContractorList | list |
A sequence contractor is made by (usually several) subcontractors and is a contractor itself. This is a typical component/composite inductive structure. If each component is related to a constraint (equation, etc.), a sequence can be regarded as the simplest way to propagate through the conjonction of the constraints (i.e., a CSP - constraint satisfaction problem -).
The contractors can either be linked by a logical AND or a logical OR. In case of AND, every subcontractor is simply called in their apparition order. In case of OR, the associated contraction is the hull of all subcontractor contractions. In this case, the result is insensitive to the order of contractors in the sequence.
| ibex::Sequence::Sequence | ( | const vector< const Contractor * > & | vec, | |
| Space & | space, | |||
| bool | logic_op | |||
| ) |
Create a sequence of contractors.
| vec | - the vector of contractors | |
| space | - the space of the resulting contractor (may be different from the space of contractors in vec). | |
| logic_op | - either true (AND) or false (OR). |
| ibex::Sequence::Sequence | ( | const CSP & | csp | ) |
| ibex::Sequence::Sequence | ( | const vector< const Contractor * > & | vec | ) |
Create a sequence from a vector of contractors. In this case, the space is the one of the first subcontractor and the logic operator is AND.
| ibex::Sequence::Sequence | ( | const Sequence & | csp | ) |
Duplicate this instance. Every subcontractor is duplicated. Every subcontractor in the new sequence shares the same space as its counterpart (except if the programer of some contractor has decided differently in his implementation of ibex::Contractor::copy() const).
| ibex::Sequence::Sequence | ( | const Contractor & | c1, | |
| const Contractor & | c2 | |||
| ) |
Create a sequence of 2 contractors. In this case, the space is the one of the first subcontractor and the logic operator is AND.
| Sequence * ibex::Sequence::copy | ( | ) | const [virtual] |
Implement the contractor abstract copy.
Generic constraint copy (spaces are passed by reference).
Implements ibex::Contractor.
| void ibex::Sequence::contract | ( | ) | [virtual] |
Algorithm:
Implements ibex::Contractor.
| virtual bool ibex::Sequence::involves | ( | int | ent | ) | const [inline, virtual] |
Return true if the entity ent is in the space.
Reimplemented from ibex::Contractor.
| int ibex::Sequence::nb_var | ( | ) | const [inline] |
Return the number of variables (in the space).
| const bool ibex::Sequence::logic_op |
true means "AND", false means "OR"
list of contractors
1.5.5