Example #1
0
void PropagatorList::clear() {
	for (PostPropagator* r = head_; r;) {
		PostPropagator* t = r;
		r = r->next;
		t->destroy();
	}
	head_ = 0;
}
Example #2
0
bool UserConfiguration::addPost(Solver& s) const {
	const SolverOpts& x = solver(s.id());
	bool  ok            = true;
	if (Lookahead::isType(x.lookType)) {
		PostPropagator* pp = s.getPost(PostPropagator::priority_reserved_look);
		if (pp) { pp->destroy(&s, true); }
		Lookahead::Params p(static_cast<VarType>(x.lookType));
		p.nant(x.heuristic.nant != 0);
		p.limit(x.lookOps);
		ok = s.addPost(new Lookahead(p));
	}
	return ok;
}