Package net.sf.tweety.logics.pl.analysis
Class FuzzyInconsistencyMeasure
- java.lang.Object
 - 
- net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure<PlFormula>
 - 
- net.sf.tweety.logics.pl.analysis.FuzzyInconsistencyMeasure
 
 
 
- 
- All Implemented Interfaces:
 PostulateEvaluatable<PlFormula>,InconsistencyMeasure<BeliefSet<PlFormula,?>>
public class FuzzyInconsistencyMeasure extends BeliefSetInconsistencyMeasure<PlFormula>
This measure implements the approach presented in [Thimm, Measuring Inconsistency with Many-Valued Logics. 2017.]- Author:
 - Matthias Thimm
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description private bytemeasure_versionOne of TFUZZY_MEASURE, SUMFUZZY_MEASUREstatic byteSUMFUZZY_MEASUREstatic constant for the Sum-version of the measureprivate TCoNormtconormThe used T-conormstatic byteTFUZZY_MEASUREstatic constant for the T-version of the measureprivate TNormtnormThe used T-norm- 
Fields inherited from interface net.sf.tweety.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description FuzzyInconsistencyMeasure(TNorm tnorm)Creates a new measure for the given T-norm.FuzzyInconsistencyMeasure(TNorm tnorm, byte measure_version)Creates a new measure for the given T-norm.FuzzyInconsistencyMeasure(TNorm tnorm, TCoNorm tconorm)Creates a new measure (T Version) for the given T-norm and T-conorm.FuzzyInconsistencyMeasure(TNorm tnorm, TCoNorm tconorm, byte measure_version)Creates a new measure for the given T-norm and T-conorm. 
- 
Method Summary
Modifier and Type Method Description private Pair<java.util.Map<Variable,Term>,java.lang.Double>constructAndSolveProblem(java.util.Collection<PlFormula> formulas, java.util.Map<Proposition,Variable> assignments)Utility methodFuzzyInterpretationgetOptimalInterpretation(java.util.Collection<PlFormula> formulas)Returns an optimal interpretation as a witness for the inconsistency value.private TermgetTerm(PlFormula formula, java.util.Map<Proposition,Variable> assignments)Returns a mathematical term representation of the given formula by replacing proposition by their given mathematical variables and replacing conjunction, disjunction, and negation by their fuzzy counterparts (taking the given t-norm and t-conorm into account).java.lang.DoubleinconsistencyMeasure(java.util.Collection<PlFormula> formulas)This method measures the inconsistency of the given set of formulas.- 
Methods inherited from class net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure 
 - 
 
 - 
 
- 
- 
Field Detail
- 
TFUZZY_MEASURE
public static final byte TFUZZY_MEASURE
static constant for the T-version of the measure- See Also:
 - Constant Field Values
 
 
- 
SUMFUZZY_MEASURE
public static final byte SUMFUZZY_MEASURE
static constant for the Sum-version of the measure- See Also:
 - Constant Field Values
 
 
- 
tnorm
private TNorm tnorm
The used T-norm 
- 
tconorm
private TCoNorm tconorm
The used T-conorm 
- 
measure_version
private byte measure_version
One of TFUZZY_MEASURE, SUMFUZZY_MEASURE 
 - 
 
- 
Constructor Detail
- 
FuzzyInconsistencyMeasure
public FuzzyInconsistencyMeasure(TNorm tnorm, TCoNorm tconorm, byte measure_version)
Creates a new measure for the given T-norm and T-conorm.- Parameters:
 tnorm- some T-normtconorm- some T-conormmeasure_version- one of TFUZZY_MEASURE, SUMFUZZY_MEASURE
 
- 
FuzzyInconsistencyMeasure
public FuzzyInconsistencyMeasure(TNorm tnorm, TCoNorm tconorm)
Creates a new measure (T Version) for the given T-norm and T-conorm.- Parameters:
 tnorm- some T-normtconorm- some T-conorm
 
- 
FuzzyInconsistencyMeasure
public FuzzyInconsistencyMeasure(TNorm tnorm)
Creates a new measure for the given T-norm. Its dual is used as t-conorm.- Parameters:
 tnorm- some T-norm
 
- 
FuzzyInconsistencyMeasure
public FuzzyInconsistencyMeasure(TNorm tnorm, byte measure_version)
Creates a new measure for the given T-norm. Its dual is used as t-conorm.- Parameters:
 tnorm- some T-normmeasure_version- one of TFUZZY_MEASURE, SUMFUZZY_MEASURE
 
 - 
 
- 
Method Detail
- 
getTerm
private Term getTerm(PlFormula formula, java.util.Map<Proposition,Variable> assignments)
Returns a mathematical term representation of the given formula by replacing proposition by their given mathematical variables and replacing conjunction, disjunction, and negation by their fuzzy counterparts (taking the given t-norm and t-conorm into account).- Parameters:
 formula- some propositional formulaassignments- an assignment of proposition to variables- Returns:
 - the term representing the given formula
 
 
- 
constructAndSolveProblem
private Pair<java.util.Map<Variable,Term>,java.lang.Double> constructAndSolveProblem(java.util.Collection<PlFormula> formulas, java.util.Map<Proposition,Variable> assignments)
Utility method- Parameters:
 formulas- a set of formulasassignments- a map of assignments- Returns:
 - the solution
 
 
- 
getOptimalInterpretation
public FuzzyInterpretation getOptimalInterpretation(java.util.Collection<PlFormula> formulas)
Returns an optimal interpretation as a witness for the inconsistency value.- Parameters:
 formulas- a set of formulas- Returns:
 - an optimal interpretation as a witness for the inconsistency value.
 
 
- 
inconsistencyMeasure
public java.lang.Double inconsistencyMeasure(java.util.Collection<PlFormula> formulas)
Description copied from class:BeliefSetInconsistencyMeasureThis method measures the inconsistency of the given set of formulas.- Specified by:
 inconsistencyMeasurein classBeliefSetInconsistencyMeasure<PlFormula>- Parameters:
 formulas- a collection of formulas.- Returns:
 - a Double indicating the degree of inconsistency.
 
 
 - 
 
 -