|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsavi.alg.weighsat3.StateWSAT3
public class StateWSAT3
State for MAX-WEIGHTED-3-SAT problem.
Field Summary | |
---|---|
protected WeightedFormula |
formula
reference to solved formula |
protected boolean[] |
varValues
current variables assignment |
protected static double |
weightSatRatio
current weight |
Constructor Summary | |
---|---|
StateWSAT3(WeightedFormula formula)
Creates a new instance of StateSAT3, intializes formula. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
int |
countSatisfactClauses()
Return number of satisfied clauses. |
void |
findInitialState(double temp)
Find initial state. |
void |
findNextState(double temp)
Find next state. |
double |
getActualCost()
Return current value of optimalization criterion. |
double |
getCostSatisfactPart()
Return current fraction of satisfaction optimalization criterion. |
double |
getCostWeightPart()
Return current fraction of evaluation optimalization criterion. |
WeightedFormula |
getFormula()
Return reference to formula. |
java.lang.String |
getReprezentation()
Return current variables assignment, text stream of 0/1 |
java.lang.String[] |
getSubmission()
Return text representation of MAX-WEIGHTED-3-SAT instance. |
boolean[] |
getVariableValues()
Return current variables assignment. |
double |
getWeight()
Return current weight |
double |
getWeightSatRatio()
Return ratio between satisfaction and evaluation variables. |
boolean |
isSatisfy()
Return true if the formula is statisfacted. |
void |
setFormula(WeightedFormula wf)
Set given formula. |
void |
setWeightSatRatio(double ratio)
Set ratio between satisfaction and evaluation variables. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WeightedFormula formula
protected boolean[] varValues
protected static double weightSatRatio
Constructor Detail |
---|
public StateWSAT3(WeightedFormula formula)
formula
- formula to solveMethod Detail |
---|
public void findInitialState(double temp)
findInitialState
in interface StateSkeleton
temp
- starting temperaturepublic void findNextState(double temp)
findNextState
in interface StateSkeleton
temp
- current temperaturepublic double getActualCost()
getActualCost
in interface StateSkeleton
public double getCostSatisfactPart()
public double getCostWeightPart()
public double getWeight()
public void setWeightSatRatio(double ratio)
ratio
- ratio between satisfaction and evaluation variables.public double getWeightSatRatio()
public boolean isSatisfy()
true
if the formula is statisfacted.
true
if the formula is statisfacted.public java.lang.String getReprezentation()
public int countSatisfactClauses()
public java.lang.Object clone()
clone
in interface StateSkeleton
clone
in class java.lang.Object
public WeightedFormula getFormula()
public void setFormula(WeightedFormula wf)
wf
- formulapublic boolean[] getVariableValues()
public java.lang.String[] getSubmission()
getSubmission
in interface StateSkeleton
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |