|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsavi.alg.maxsat3.StateMaxSAT3
public class StateMaxSAT3
State representing MAX-3-SAT problem.
Field Summary | |
---|---|
protected Formula |
formula
reference to formula |
protected boolean[] |
varValues
current variables values |
Constructor Summary | |
---|---|
StateMaxSAT3(Formula formula)
Creates a new instance of StateSAT3, initialize formula |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
int |
countSatisfactClauses()
Count number of current satisfied clauses |
void |
findInitialState(double temp)
Create intial solution. |
void |
findNextState(double temp)
Find next state. |
double |
getActualCost()
Count current optimalization criterion. |
Formula |
getFormula()
Returns reference to formula |
java.lang.String[] |
getSubmission()
Return text representation of max-3-sat instance. |
boolean[] |
getVariableValues()
Returns current variable assignment |
boolean |
isSatisfy()
Return true if formula is satisfied with current variable assignment. |
void |
setFormula(Formula f)
Set formula to this object |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Formula formula
protected boolean[] varValues
Constructor Detail |
---|
public StateMaxSAT3(Formula formula)
formula
- formulaMethod 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 boolean isSatisfy()
public int countSatisfactClauses()
public java.lang.Object clone()
clone
in interface StateSkeleton
clone
in class java.lang.Object
public Formula getFormula()
public void setFormula(Formula f)
f
- 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 |