org.sat4j.minisat.orders
Class UserFixedPhaseSelectionStrategy

java.lang.Object
  extended by org.sat4j.minisat.orders.UserFixedPhaseSelectionStrategy
All Implemented Interfaces:
java.io.Serializable, IPhaseSelectionStrategy

public class UserFixedPhaseSelectionStrategy
extends java.lang.Object

Selection strategy where the phase selection is decided at init time and is not updated during the search.

Author:
leberre
See Also:
Serialized Form

Constructor Summary
UserFixedPhaseSelectionStrategy()
           
 
Method Summary
 void assignLiteral(int p)
          indicate that a literal has been satisfied.
 void init(int nlength)
          that method has the responsibility to initialize all arrays in the heuristics.
 void init(int var, int p)
          initialize the phase of a given variable to the given value.
 int select(int var)
          selects the phase of the variable according to a phase selection strategy.
 java.lang.String toString()
           
 void updateVar(int p)
          To be called when the activity of a literal changed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserFixedPhaseSelectionStrategy

public UserFixedPhaseSelectionStrategy()
Method Detail

assignLiteral

public void assignLiteral(int p)
Description copied from interface: IPhaseSelectionStrategy
indicate that a literal has been satisfied.


updateVar

public void updateVar(int p)
Description copied from interface: IPhaseSelectionStrategy
To be called when the activity of a literal changed.

Parameters:
p - a literal. The associated variable will be updated.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

init

public void init(int nlength)
Description copied from interface: IPhaseSelectionStrategy
that method has the responsibility to initialize all arrays in the heuristics.

Specified by:
init in interface IPhaseSelectionStrategy
Parameters:
nlength - the number of variables managed by the heuristics.

init

public void init(int var,
                 int p)
Description copied from interface: IPhaseSelectionStrategy
initialize the phase of a given variable to the given value. That method is suppose to be called AFTER init(int).

Specified by:
init in interface IPhaseSelectionStrategy
Parameters:
var - a variable
p - it's initial phase

select

public int select(int var)
Description copied from interface: IPhaseSelectionStrategy
selects the phase of the variable according to a phase selection strategy.

Specified by:
select in interface IPhaseSelectionStrategy
Parameters:
var - a variable chosen by the heuristics
Returns:
either var or not var, depending of the selection strategy.