|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.minisat.orders.RandomLiteralSelectionStrategy
public final class RandomLiteralSelectionStrategy
The variable selection strategy randomly picks one phase, either positive or negative.
Field Summary | |
---|---|
static Random |
RAND
|
Constructor Summary | |
---|---|
RandomLiteralSelectionStrategy()
|
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. |
String |
toString()
|
void |
updateVar(int p)
To be called when the activity of a literal changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Random RAND
Constructor Detail |
---|
public RandomLiteralSelectionStrategy()
Method Detail |
---|
public void assignLiteral(int p)
IPhaseSelectionStrategy
assignLiteral
in interface IPhaseSelectionStrategy
public void init(int nlength)
IPhaseSelectionStrategy
init
in interface IPhaseSelectionStrategy
nlength
- the number of variables managed by the heuristics.public void init(int var, int p)
IPhaseSelectionStrategy
init
in interface IPhaseSelectionStrategy
var
- a variablep
- it's initial phasepublic int select(int var)
IPhaseSelectionStrategy
select
in interface IPhaseSelectionStrategy
var
- a variable chosen by the heuristics
public void updateVar(int p)
IPhaseSelectionStrategy
updateVar
in interface IPhaseSelectionStrategy
p
- a literal. The associated variable will be updated.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |