|
| Assignment () |
|
bool | qEmpty () const |
|
uint32 | qSize () const |
|
Literal | qPop () |
|
void | qReset () |
|
uint32 | numVars () const |
| Number of variables in the three-valued assignment. More...
|
|
uint32 | assigned () const |
| Number of assigned variables. More...
|
|
uint32 | free () const |
| Number of free variables. More...
|
|
uint32 | maxLevel () const |
| Returns the largest possible decision level. More...
|
|
ValueRep | value (Var v) const |
| Returns v's value in the three-valued assignment. More...
|
|
uint32 | level (Var v) const |
| Returns the decision level on which v was assigned if value(v) != value_free. More...
|
|
bool | valid (Var v) const |
| Returns true if v was not eliminated from the assignment. More...
|
|
const ValueSet | pref (Var v) const |
| Returns the set of preferred values of v. More...
|
|
const Antecedent & | reason (Var v) const |
| Returns the reason for v being assigned if value(v) != value_free. More...
|
|
uint32 | numData () const |
| Returns the number of allocated data slots. More...
|
|
uint32 | data (Var v) const |
| Returns the reason data associated with v. More...
|
|
void | resize (uint32 nv) |
| Resize to nv variables. More...
|
|
Var | addVar () |
| Adds a var to assignment - initially the new var is unassigned. More...
|
|
void | requestPrefs () |
| Allocates space for storing preferred values for all variables. More...
|
|
void | requestData (uint32 nv) |
| Allocates data slots for nv variables to be used for storing additional reason data. More...
|
|
void | eliminate (Var v) |
| Eliminates v from the assignment. More...
|
|
bool | assign (Literal p, uint32 lev, const Antecedent &x) |
| Assigns p.var() on level lev to the value that makes p true and stores x as reason for the assignment. More...
|
|
bool | assign (Literal p, uint32 lev, Constraint *c, uint32 data) |
|
void | undoTrail (LitVec::size_type first, bool save) |
| Undos all assignments in the range trail[first, last). More...
|
|
void | undoLast () |
| Undos the last assignment. More...
|
|
Literal | last () const |
| Returns the last assignment as a true literal. More...
|
|
Literal & | last () |
|
|
Low-level implementation functions. Use with care and only if you know what you are doing!
|
uint32 | units () const |
|
bool | seen (Var v, uint8 m) const |
|
void | setSeen (Var v, uint8 m) |
|
void | clearSeen (Var v) |
|
void | clearValue (Var v) |
|
void | setValue (Var v, ValueRep val) |
|
void | setReason (Var v, const Antecedent &a) |
|
void | setData (Var v, uint32 data) |
|
void | setPref (Var v, ValueSet::Value which, ValueRep to) |
|
void | copyAssignment (Assignment &o) const |
|
bool | markUnits () |
|
void | setUnits (uint32 ts) |
|
Stores assignment related information.
For each variable v, the class stores
- v's current value (value_free if unassigned)
- the decision level on which v was assign (only valid if value(v) != value_free)
- the reason why v is in the assignment (only valid if value(v) != value_free)
- (optionally) some additional data associated with the reason
Furthermore, the class stores the sequences of assignments as a set of true literals in its trail-member.