1
0
Fork 0

Merge pull request #352 from naderman/positive-branch-levels

Levels are always > 0, negative level was just a hack in the C implementation
pull/354/head
Jordi Boggiano 2012-02-22 07:23:43 -08:00
commit 2aa61292ae
1 changed files with 2 additions and 2 deletions

View File

@ -1393,7 +1393,7 @@ class Solver
// if there are multiple candidates, then branch // if there are multiple candidates, then branch
if (count($literals)) { if (count($literals)) {
$this->branches[] = array($literals, -$level); $this->branches[] = array($literals, $level);
} }
return $this->setPropagateLearn($level, $selectedLiteral, $disableRules, $rule); return $this->setPropagateLearn($level, $selectedLiteral, $disableRules, $rule);
@ -1996,7 +1996,7 @@ class Solver
$level = $lastLevel; $level = $lastLevel;
$this->revert($level); $this->revert($level);
$why = $this->decisionQueueWhy[count($this->decisionQueueWhy)]; $why = $this->decisionQueueWhy[count($this->decisionQueueWhy) - 1];
$oLevel = $level; $oLevel = $level;
$level = $this->setPropagateLearn($level, $lastLiteral, $disableRules, $why); $level = $this->setPropagateLearn($level, $lastLiteral, $disableRules, $why);