org.opt4j.satdecoding.sat4j
Class VariableOrder

java.lang.Object
  extended by org.sat4j.minisat.orders.VarOrderHeap
      extended by org.opt4j.satdecoding.sat4j.VariableOrder
All Implemented Interfaces:
java.io.Serializable, org.sat4j.minisat.core.IOrder

public class VariableOrder
extends org.sat4j.minisat.orders.VarOrderHeap

A VariableOrder implementation for the SAT4J interface.
(not documented, see Sat4J.org)

See Also:
Serialized Form

Field Summary
protected  boolean[] phase
           
protected static double VAR_RESCALE_BOUND
           
protected static double VAR_RESCALE_FACTOR
           
protected  double varInc
           
 
Fields inherited from class org.sat4j.minisat.orders.VarOrderHeap
activity, heap, lits, phaseStrategy
 
Constructor Summary
VariableOrder()
          Constructs a VariableOrder.
 
Method Summary
 void init()
           
 int select()
           
 void setLits(org.sat4j.minisat.core.ILits lits)
           
 void setVarActivity(int var, double value)
          Sets the activity of a variable var to the specified value.
 void setVarInc(double value)
          Sets the value varInc to increase the activity of the variables.
 void setVarPhase(int var, boolean phase)
          Sets the phase of a variable var.
protected  void updateActivity(int var)
           
protected  void updateActivity(int var, double value)
          Increments the activity of a variable var by the specified value.
 void updateVar(int p)
           
protected  void varRescaleActivity()
          Rescales the activities of the variables.
 
Methods inherited from class org.sat4j.minisat.orders.VarOrderHeap
assignLiteral, getPhaseSelectionStrategy, getVariableHeuristics, getVocabulary, numberOfInterestingVariables, printStat, setPhaseSelectionStrategy, setVarDecay, toString, undo, updateVarAtDecisionLevel, varActivity, varDecayActivity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VAR_RESCALE_FACTOR

protected static final double VAR_RESCALE_FACTOR
See Also:
Constant Field Values

VAR_RESCALE_BOUND

protected static final double VAR_RESCALE_BOUND
See Also:
Constant Field Values

varInc

protected double varInc

phase

protected boolean[] phase
Constructor Detail

VariableOrder

public VariableOrder()
Constructs a VariableOrder.

Method Detail

setLits

public void setLits(org.sat4j.minisat.core.ILits lits)
Specified by:
setLits in interface org.sat4j.minisat.core.IOrder
Overrides:
setLits in class org.sat4j.minisat.orders.VarOrderHeap

init

public void init()
Specified by:
init in interface org.sat4j.minisat.core.IOrder
Overrides:
init in class org.sat4j.minisat.orders.VarOrderHeap

updateActivity

protected void updateActivity(int var)
Overrides:
updateActivity in class org.sat4j.minisat.orders.VarOrderHeap

updateActivity

protected void updateActivity(int var,
                              double value)
Increments the activity of a variable var by the specified value.

Parameters:
var - the variable
value - the value to increment the variable

updateVar

public void updateVar(int p)
Specified by:
updateVar in interface org.sat4j.minisat.core.IOrder
Overrides:
updateVar in class org.sat4j.minisat.orders.VarOrderHeap

setVarInc

public void setVarInc(double value)
Sets the value varInc to increase the activity of the variables.

Parameters:
value - the value to increase the activity of the variables

varRescaleActivity

protected void varRescaleActivity()
Rescales the activities of the variables.


setVarActivity

public void setVarActivity(int var,
                           double value)
Sets the activity of a variable var to the specified value.

Parameters:
var - the variable
value - the activity to set

setVarPhase

public void setVarPhase(int var,
                        boolean phase)
Sets the phase of a variable var.

Parameters:
var - the variable
phase - the phase

select

public int select()
Specified by:
select in interface org.sat4j.minisat.core.IOrder
Overrides:
select in class org.sat4j.minisat.orders.VarOrderHeap