org.sat4j.minisat.orders
Class VarOrder

java.lang.Object
  extended by org.sat4j.minisat.orders.VarOrder
All Implemented Interfaces:
java.io.Serializable, IOrder
Direct Known Subclasses:
JWOrder, MyOrder, PureOrder

public class VarOrder
extends java.lang.Object
implements java.io.Serializable, IOrder

Author:
leberre Heuristique du prouveur. Changement par rapport au MiniSAT original : la gestion activity est faite ici et non plus dans Solver.
See Also:
Serialized Form

Constructor Summary
VarOrder()
           
 
Method Summary
 ILits getVocabulary()
           
 void init()
          that method has the responsability to initialize all arrays in the heuristics.
 void newVar()
          Appel�e quand une nouvelle variable est cr��e.
 void newVar(int howmany)
          Appel�e lorsque plusieurs variables sont cr��es
 int numberOfInterestingVariables()
           
 void printStat(java.io.PrintStream out, java.lang.String prefix)
           
 int select()
          S�lectionne une nouvelle variable, non affect�e, ayant l'activit� la plus �lev�e.
 void setLits(ILits lits)
           
 void setVarDecay(double d)
          Change la valeur de varDecay.
 java.lang.String toString()
          Affiche les litt�raux dans l'ordre de l'heuristique, la valeur de l'activite entre ().
 void undo(int x)
          M�thode appel�e quand la variable x est d�saffect�e.
 void updateVar(int p)
          To be called when the activity of a literal changed.
 double varActivity(int p)
          To obtain the current activity of a variable.
 void varDecayActivity()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VarOrder

public VarOrder()
Method Detail

setLits

public void setLits(ILits lits)
Specified by:
setLits in interface IOrder

newVar

public void newVar()
Description copied from interface: IOrder
Appel�e quand une nouvelle variable est cr��e.

Specified by:
newVar in interface IOrder

newVar

public void newVar(int howmany)
Description copied from interface: IOrder
Appel�e lorsque plusieurs variables sont cr��es

Specified by:
newVar in interface IOrder
Parameters:
howmany - le nombre de variables cr��es

select

public int select()
Description copied from interface: IOrder
S�lectionne une nouvelle variable, non affect�e, ayant l'activit� la plus �lev�e.

Specified by:
select in interface IOrder
Returns:
Lit.UNDEFINED si aucune variable n'est trouv�e

setVarDecay

public void setVarDecay(double d)
Change la valeur de varDecay.

Specified by:
setVarDecay in interface IOrder
Parameters:
d - la nouvelle valeur de varDecay

undo

public void undo(int x)
Description copied from interface: IOrder
M�thode appel�e quand la variable x est d�saffect�e.

Specified by:
undo in interface IOrder

updateVar

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

Specified by:
updateVar in interface IOrder
Parameters:
p - a literal. The associated variable will be updated.

varDecayActivity

public void varDecayActivity()
Specified by:
varDecayActivity in interface IOrder

varActivity

public double varActivity(int p)
Description copied from interface: IOrder
To obtain the current activity of a variable.

Specified by:
varActivity in interface IOrder
Parameters:
p - a literal
Returns:
the activity of the variable associated to that literal.

numberOfInterestingVariables

public int numberOfInterestingVariables()

init

public void init()
Description copied from interface: IOrder
that method has the responsability to initialize all arrays in the heuristics. PLEASE CALL super.init() IF YOU OVERRIDE THAT METHOD.

Specified by:
init in interface IOrder

toString

public java.lang.String toString()
Affiche les litt�raux dans l'ordre de l'heuristique, la valeur de l'activite entre ().

Overrides:
toString in class java.lang.Object
Returns:
les litt�raux dans l'ordre courant.

getVocabulary

public ILits getVocabulary()

printStat

public void printStat(java.io.PrintStream out,
                      java.lang.String prefix)
Specified by:
printStat in interface IOrder