Class DfInconsistencyMeasure<S extends Formula>
- java.lang.Object
 - 
- net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure<S>
 - 
- net.sf.tweety.logics.commons.analysis.DfInconsistencyMeasure<S>
 
 
 
- 
- Type Parameters:
 S- The specific type of formulas
- All Implemented Interfaces:
 PostulateEvaluatable<S>,InconsistencyMeasure<BeliefSet<S,?>>
public class DfInconsistencyMeasure<S extends Formula> extends BeliefSetInconsistencyMeasure<S>
This class implements the family of "Measures of the Degree of Inconsistency" from [Mu,Liu,Jin, Bell. A syntax-based approach to measuring the degree of inconsistency for belief bases. IJAR 52(7), 2011.]- Author:
 - Matthias Thimm
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description private MusEnumerator<S>enumeratorThe MUs enumerator.private SimpleFunction<double[],java.lang.Double>measureFunctionThe measure function used to aggregate the normalized cardinalities of minimal inconsistent subsets.- 
Fields inherited from interface net.sf.tweety.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DfInconsistencyMeasure(SimpleFunction<double[],java.lang.Double> measureFunction, MusEnumerator<S> enumerator)Creates a new inconsistency measure. 
- 
Method Summary
Modifier and Type Method Description private double[]getConsistentSetCounts(java.util.Collection<S> inFormulas, java.util.Collection<S> restFormulas, java.util.Collection<java.util.Collection<S>> mus, int card)Computes the numbers of consistent subsets for cardinalities |inFormulas|...|inFormulas|+|restFormulas| (the knowledge base considered is inFormulas\cup restFormulas and the formulas in inFormulas have to be part of every considered subset).java.lang.DoubleinconsistencyMeasure(java.util.Collection<S> formulas)This method measures the inconsistency of the given set of formulas.java.lang.StringtoString()- 
Methods inherited from class net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure 
 - 
 
 - 
 
- 
- 
Field Detail
- 
enumerator
private MusEnumerator<S extends Formula> enumerator
The MUs enumerator. 
- 
measureFunction
private SimpleFunction<double[],java.lang.Double> measureFunction
The measure function used to aggregate the normalized cardinalities of minimal inconsistent subsets. 
 - 
 
- 
Constructor Detail
- 
DfInconsistencyMeasure
public DfInconsistencyMeasure(SimpleFunction<double[],java.lang.Double> measureFunction, MusEnumerator<S> enumerator)
Creates a new inconsistency measure.- Parameters:
 measureFunction- the measure function used to aggregate the normalized cardinalities of minimal inconsistent subsets.enumerator- some MUs enumerator
 
 - 
 
- 
Method Detail
- 
inconsistencyMeasure
public java.lang.Double inconsistencyMeasure(java.util.Collection<S> formulas)
Description copied from class:BeliefSetInconsistencyMeasureThis method measures the inconsistency of the given set of formulas.- Specified by:
 inconsistencyMeasurein classBeliefSetInconsistencyMeasure<S extends Formula>- Parameters:
 formulas- a collection of formulas.- Returns:
 - a Double indicating the degree of inconsistency.
 
 
- 
getConsistentSetCounts
private double[] getConsistentSetCounts(java.util.Collection<S> inFormulas, java.util.Collection<S> restFormulas, java.util.Collection<java.util.Collection<S>> mus, int card)
Computes the numbers of consistent subsets for cardinalities |inFormulas|...|inFormulas|+|restFormulas| (the knowledge base considered is inFormulas\cup restFormulas and the formulas in inFormulas have to be part of every considered subset).- Parameters:
 inFormulas- a set of formulas that are in.restFormulas- the remaining formulasmus- the set of muscard- the cardinality of the whole knowledge base.- Returns:
 - the numbers of consistent subsets for cardinalities |inFormulas|...|inFormulas|+|restFormulas|
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -