public class RandomWalkDecorator extends Object implements IOrder, Serializable
| Constructor and Description |
|---|
RandomWalkDecorator(VarOrderHeap order) |
RandomWalkDecorator(VarOrderHeap order,
double p) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignLiteral(int q)
indicate that a literal has been satisfied.
|
IPhaseSelectionStrategy |
getPhaseSelectionStrategy() |
double |
getProbability() |
double[] |
getVariableHeuristics()
Read-Only access to the value of the heuristics for each variable.
|
void |
init()
that method has the responsibility to initialize all arrays in the
heuristics.
|
void |
printStat(PrintWriter out,
String prefix)
Display statistics regarding the heuristics.
|
int |
select()
Selects the next "best" unassigned literal.
|
void |
setLits(ILits lits)
Method used to provide an easy access the the solver vocabulary.
|
void |
setPhaseSelectionStrategy(IPhaseSelectionStrategy strategy) |
void |
setProbability(double p) |
void |
setVarDecay(double d)
Sets the variable activity decay as a growing factor for the next
variable activity.
|
String |
toString() |
void |
undo(int x)
Method called when a variable is unassigned.
|
void |
updateVar(int q)
To be called when the activity of a literal changed.
|
void |
updateVarAtDecisionLevel(int q)
Allow to perform a specific action when a literal of the current decision
level is updated.
|
double |
varActivity(int q)
To obtain the current activity of a variable.
|
void |
varDecayActivity()
Decay the variables activities.
|
public RandomWalkDecorator(VarOrderHeap order)
public RandomWalkDecorator(VarOrderHeap order, double p)
public void assignLiteral(int q)
IOrderassignLiteral in interface IOrderpublic IPhaseSelectionStrategy getPhaseSelectionStrategy()
getPhaseSelectionStrategy in interface IOrderpublic double getProbability()
public void setProbability(double p)
public void init()
IOrderpublic void printStat(PrintWriter out, String prefix)
IOrderpublic int select()
IOrderpublic void setLits(ILits lits)
IOrderpublic void setPhaseSelectionStrategy(IPhaseSelectionStrategy strategy)
setPhaseSelectionStrategy in interface IOrderpublic void setVarDecay(double d)
IOrdersetVarDecay in interface IOrderd - a number bigger than 1 that will increase the activity of the
variables involved in future conflict. This is similar but
more efficient than decaying all the activities by a similar
factor.public void undo(int x)
IOrderpublic void updateVar(int q)
IOrderpublic double varActivity(int q)
IOrdervarActivity in interface IOrderq - a literalpublic void varDecayActivity()
IOrdervarDecayActivity in interface IOrderpublic void updateVarAtDecisionLevel(int q)
IOrderIOrder.updateVar(int).updateVarAtDecisionLevel in interface IOrderq - a literalpublic double[] getVariableHeuristics()
IOrdergetVariableHeuristics in interface IOrderCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.