Public Member Functions | |
bool | attach (Solver &) |
Attaches this object to the given solver. | |
Constraint * | cloneAttach (Solver &) |
Returns a clone of this and adds necessary watches to the given solver. | |
void | destroy (Solver *, bool) |
Default is to call delete this. | |
DomMinimize (const LitVec &lits) | |
bool | handleModel (Solver &s) |
Shall commit the model in s to the shared data object. | |
bool | handleUnsat (Solver &, bool, LitVec &) |
Shall handle the unsatisfiable path in s. | |
bool | integrate (Solver &s) |
Shall activate the minimize constraint by integrating bounds stored in the shared data object. | |
PropResult | propagate (Solver &, Literal, uint32 &) |
void | reason (Solver &, Literal, LitVec &) |
bool | relax (Solver &, bool) |
Shall relax this constraint (i.e. remove any bounds). | |
bool | simplify (Solver &s, bool) |
Private Types | |
typedef PodVector< Constraint * > ::type | ConstraintDB |
Static Private Member Functions | |
static SharedMinimizeData * | createDataFrom (const LitVec &lits) |
Private Attributes | |
LitVec | clause_ |
ConstraintDB | nogoods_ |
Definition at line 620 of file heuristics.cpp.
typedef PodVector<Constraint*>::type Clasp::DomainHeuristic::DomMinimize::ConstraintDB [private] |
Definition at line 646 of file heuristics.cpp.
Clasp::DomainHeuristic::DomMinimize::DomMinimize | ( | const LitVec & | lits | ) | [inline, explicit] |
Definition at line 622 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::attach | ( | Solver & | s | ) | [inline, virtual] |
Attaches this object to the given solver.
Implements Clasp::MinimizeConstraint.
Definition at line 630 of file heuristics.cpp.
Constraint* Clasp::DomainHeuristic::DomMinimize::cloneAttach | ( | Solver & | other | ) | [inline, virtual] |
Returns a clone of this and adds necessary watches to the given solver.
The function shall create and return a copy of this constraint to be used in the given solver. Furthermore, it shall add necessary watches to the given solver.
Reimplemented from Clasp::MinimizeConstraint.
Definition at line 627 of file heuristics.cpp.
static SharedMinimizeData* Clasp::DomainHeuristic::DomMinimize::createDataFrom | ( | const LitVec & | lits | ) | [inline, static, private] |
Definition at line 636 of file heuristics.cpp.
void Clasp::DomainHeuristic::DomMinimize::destroy | ( | Solver * | s, |
bool | detach | ||
) | [virtual] |
Default is to call delete this.
Reimplemented from Clasp::MinimizeConstraint.
Definition at line 927 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::handleModel | ( | Solver & | s | ) | [virtual] |
Shall commit the model in s to the shared data object.
The return value indicates whether the model is valid w.r.t the costs stored in the shared data object.
Implements Clasp::MinimizeConstraint.
Definition at line 934 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::handleUnsat | ( | Solver & | s, |
bool | upShared, | ||
LitVec & | restore | ||
) | [inline, virtual] |
Shall handle the unsatisfiable path in s.
Implements Clasp::MinimizeConstraint.
Definition at line 632 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::integrate | ( | Solver & | s | ) | [virtual] |
Shall activate the minimize constraint by integrating bounds stored in the shared data object.
Implements Clasp::MinimizeConstraint.
Definition at line 941 of file heuristics.cpp.
PropResult Clasp::DomainHeuristic::DomMinimize::propagate | ( | Solver & | s, |
Literal | p, | ||
uint32 & | data | ||
) | [inline, virtual] |
Propagate is called for each constraint that watches p. It shall enqueue all consequences of p becoming true.
s | The solver in which p became true. |
p | A literal watched by this constraint that recently became true. |
data | The data-blob that this constraint passed when the watch for p was registered. |
Implements Clasp::Constraint.
Definition at line 624 of file heuristics.cpp.
void Clasp::DomainHeuristic::DomMinimize::reason | ( | Solver & | s, |
Literal | p, | ||
LitVec & | lits | ||
) | [inline, virtual] |
Implements Clasp::Constraint.
Definition at line 625 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::relax | ( | Solver & | s, |
bool | reset | ||
) | [inline, virtual] |
Shall relax this constraint (i.e. remove any bounds).
If reset is true, shall also remove search-path related state.
Implements Clasp::MinimizeConstraint.
Definition at line 631 of file heuristics.cpp.
bool Clasp::DomainHeuristic::DomMinimize::simplify | ( | Solver & | s, |
bool | reinit | ||
) | [inline, virtual] |
Simplify this constraint.
Reimplemented from Clasp::Constraint.
Definition at line 626 of file heuristics.cpp.
Definition at line 648 of file heuristics.cpp.
Definition at line 647 of file heuristics.cpp.