Class DSumSatInconsistencyMeasure
- java.lang.Object
-
- org.tweetyproject.logics.commons.analysis.BeliefSetInconsistencyMeasure<PlFormula>
-
- org.tweetyproject.logics.pl.analysis.SatBasedInconsistencyMeasure
-
- org.tweetyproject.logics.pl.analysis.DSumSatInconsistencyMeasure
-
- All Implemented Interfaces:
PostulateEvaluatable<PlFormula>,InconsistencyMeasure<BeliefSet<PlFormula,?>>
public class DSumSatInconsistencyMeasure extends SatBasedInconsistencyMeasure
This class presents a sat-encoding-based implementation of the sum-distance measure of [Grant and Hunter, “Analysing incThis measure seeks an interpretation I such that the the sum of the distances between every formula of the knowledge base and I is minimal. The value of the inconsistency is than exactly this value.- Author:
- Anna Gessler
-
-
Field Summary
-
Fields inherited from interface org.tweetyproject.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description DSumSatInconsistencyMeasure()Create a new DSumSatInconsistencyMeasure with the default SAT solver.DSumSatInconsistencyMeasure(SatSolver solver)Create a new DSumSatInconsistencyMeasure with the given SAT solver.
-
Method Summary
Modifier and Type Method Description PlBeliefSetgetSATEncoding(java.util.Collection<PlFormula> kb, int upper_bound)java.lang.DoubleinconsistencyMeasure(java.util.Collection<PlFormula> kb)This method measures the inconsistency of the given set of formulas.java.lang.StringtoString()-
Methods inherited from class org.tweetyproject.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure
-
-
-
-
Constructor Detail
-
DSumSatInconsistencyMeasure
public DSumSatInconsistencyMeasure(SatSolver solver)
Create a new DSumSatInconsistencyMeasure with the given SAT solver.- Parameters:
solver- some SAT solver
-
DSumSatInconsistencyMeasure
public DSumSatInconsistencyMeasure()
Create a new DSumSatInconsistencyMeasure with the default SAT solver.
-
-
Method Detail
-
inconsistencyMeasure
public java.lang.Double inconsistencyMeasure(java.util.Collection<PlFormula> kb)
Description copied from class:BeliefSetInconsistencyMeasureThis method measures the inconsistency of the given set of formulas.- Specified by:
inconsistencyMeasurein classBeliefSetInconsistencyMeasure<PlFormula>- Parameters:
kb- a collection of formulas.- Returns:
- a Double indicating the degree of inconsistency.
-
getSATEncoding
public PlBeliefSet getSATEncoding(java.util.Collection<PlFormula> kb, int upper_bound)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-