Documentation

RuleWatchNode
in package

Wrapper around a Rule which keeps track of the two literals it watches

Used by RuleWatchGraph to store rules in two RuleWatchChains.

Tags
author

Nils Adermann naderman@naderman.de

Table of Contents

$watch1  : mixed
$watch2  : mixed
$rule  : mixed
__construct()  : mixed
Creates a new node watching the first and second literals of the rule.
getOtherWatch()  : int
Given one watched literal, this method returns the other watched literal
getRule()  : Rule
Returns the rule this node wraps
moveWatch()  : mixed
Moves a watch from one literal to another
watch2OnHighest()  : mixed
Places the second watch on the rule's literal, decided at the highest level

Properties

Methods

__construct()

Creates a new node watching the first and second literals of the rule.

public __construct(Rule $rule) : mixed
Parameters
$rule : Rule

The rule to wrap

Return values
mixed

getOtherWatch()

Given one watched literal, this method returns the other watched literal

public getOtherWatch(int $literal) : int
Parameters
$literal : int

The watched literal that should not be returned

Return values
int

A literal

moveWatch()

Moves a watch from one literal to another

public moveWatch(int $from, int $to) : mixed
Parameters
$from : int

The previously watched literal

$to : int

The literal to be watched now

Return values
mixed

watch2OnHighest()

Places the second watch on the rule's literal, decided at the highest level

public watch2OnHighest(Decisions $decisions) : mixed

Useful for learned rules where the literal for the highest rule is most likely to quickly lead to further decisions.

Parameters
$decisions : Decisions

The decisions made so far by the solver

Return values
mixed

Search results