model.logic
Class Formula
java.lang.Object
model.logic.Formula
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable<Formula>
public class Formula
- extends java.lang.Object
- implements java.lang.Cloneable, java.lang.Comparable<Formula>
This class represents the formula logic object. A formula is defined by a set
of clauses and the real formula is the conjunction of those clauses.
A formula has a unique id, a representation (that is basically the string representing the formula, as it has been given by the user) and a set of clauses that corresponds to a conjonctive normal form of the formula. The CNF is obtained with a Tseitin encoding.
- Author:
- stephanieroussel
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TAUTOLOGIE
public static Formula TAUTOLOGIE
Formula
public Formula(int id,
java.util.List<Clause> listeClauses)
Formula
public Formula(int id,
java.util.List<Clause> clauses,
java.lang.String formule)
Formula
public Formula(int id,
Clause clause)
Formula
public Formula(int id)
getShapleyValue
public double getShapleyValue()
setShapleyValue
public void setShapleyValue(double shapleyValue)
getId
public int getId()
setId
public void setId(int id)
getClauses
public java.util.List<Clause> getClauses()
setClauses
public void setClauses(java.util.List<Clause> clauses)
getGroup
public int getGroup()
setGroup
public void setGroup(int group)
addClause
public void addClause(Clause c)
getFormula
public java.lang.String getFormula()
setFormula
public void setFormula(java.lang.String formula)
removeClause
public boolean removeClause(Clause c)
getRepresentation
public java.lang.String getRepresentation()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toShortString
public java.lang.String toShortString()
containsClause
public boolean containsClause(Clause c)
copy
public Formula copy()
compareTo
public int compareTo(Formula o)
- Specified by:
compareTo
in interface java.lang.Comparable<Formula>