Remove duplicate function from decisions

main
Nils Adermann 12 years ago
parent 5b1a48663e
commit 76f8642feb

@ -46,16 +46,6 @@ class Decisions implements \Iterator, \Countable
);
}
public function contain($literal)
{
$packageId = abs($literal);
return (
$this->decisionMap[$packageId] > 0 && $literal > 0 ||
$this->decisionMap[$packageId] < 0 && $literal < 0
);
}
public function satisfy($literal)
{
$packageId = abs($literal);

@ -94,7 +94,7 @@ class RuleWatchGraph
$node = $chain->current();
$otherWatch = $node->getOtherWatch($literal);
if (!$node->getRule()->isDisabled() && !$decisions->contain($otherWatch)) {
if (!$node->getRule()->isDisabled() && !$decisions->satisfy($otherWatch)) {
$ruleLiterals = $node->getRule()->getLiterals();
$alternativeLiterals = array_filter($ruleLiterals, function ($ruleLiteral) use ($literal, $otherWatch, $decisions) {

Loading…
Cancel
Save