1
0
Fork 0

Removed unused private `Solver::enableDisableLearnedRules` method (#11311)

pull/11334/head
Markus Staab 2023-02-10 13:45:54 +01:00 committed by GitHub
parent a9b79ba470
commit 933ca81d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 29 deletions

View File

@ -565,35 +565,6 @@ class Solver
return 0; return 0;
} }
/**
* enable/disable learnt rules
*
* we have enabled or disabled some of our rules. We now re-enable all
* of our learnt rules except the ones that were learnt from rules that
* are now disabled.
*/
private function enableDisableLearnedRules(): void
{
foreach ($this->rules->getIteratorFor(RuleSet::TYPE_LEARNED) as $rule) {
$why = $this->learnedWhy[spl_object_hash($rule)];
$problemRules = $this->learnedPool[$why];
$foundDisabled = false;
foreach ($problemRules as $problemRule) {
if ($problemRule->isDisabled()) {
$foundDisabled = true;
break;
}
}
if ($foundDisabled && $rule->isEnabled()) {
$rule->disable();
} elseif (!$foundDisabled && $rule->isDisabled()) {
$rule->enable();
}
}
}
private function runSat(): void private function runSat(): void
{ {
$this->propagateIndex = 0; $this->propagateIndex = 0;