Class MaInconsistencyMeasure<S extends Formula>
- java.lang.Object
-
- net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure<S>
-
- net.sf.tweety.logics.commons.analysis.MaInconsistencyMeasure<S>
-
- Type Parameters:
S- the type of formulas
- All Implemented Interfaces:
PostulateEvaluatable<S>,InconsistencyMeasure<BeliefSet<S,?>>
public class MaInconsistencyMeasure<S extends Formula> extends BeliefSetInconsistencyMeasure<S>
This class models the I_M inconsistency measure from e.g. [Grant,Hunter,2011a]. It takes as inconsistency value the number of maximal consistent subsets plus the number of formulas that are self-contradicting minus 1.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private MusEnumerator<S>enumeratorThe MUs enumerator.-
Fields inherited from interface net.sf.tweety.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description MaInconsistencyMeasure(MusEnumerator<S> enumerator)Creates a new inconsistency measure.
-
Method Summary
Modifier and Type Method Description java.lang.DoubleinconsistencyMeasure(java.util.Collection<S> formulas)This method measures the inconsistency of the given set of formulas.private doublenumMaxConsistentFormulas(java.util.Collection<java.util.Collection<S>> muses)Computes the number of maximal consistent subsets by computing minimal hitting sets from minimal inconsistent sets.-
Methods inherited from class net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure
-
-
-
-
Field Detail
-
enumerator
private MusEnumerator<S extends Formula> enumerator
The MUs enumerator.
-
-
Constructor Detail
-
MaInconsistencyMeasure
public MaInconsistencyMeasure(MusEnumerator<S> enumerator)
Creates a new inconsistency measure.- Parameters:
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.
-
numMaxConsistentFormulas
private double numMaxConsistentFormulas(java.util.Collection<java.util.Collection<S>> muses)
Computes the number of maximal consistent subsets by computing minimal hitting sets from minimal inconsistent sets.- Parameters:
muses- the set of minimal consistent subsets- Returns:
- the number of maximal consistent subsets
-
-