Package net.sf.tweety.commons.analysis
Class DrasticDistance<T extends Interpretation<B,S>,B extends BeliefBase,S extends Formula>
- java.lang.Object
-
- net.sf.tweety.commons.analysis.DrasticDistance<T,B,S>
-
- Type Parameters:
T
- The actual type of interpretationB
- the type of belief basesS
- the type of formulas
- All Implemented Interfaces:
InterpretationDistance<T,B,S>
public class DrasticDistance<T extends Interpretation<B,S>,B extends BeliefBase,S extends Formula> extends java.lang.Object implements InterpretationDistance<T,B,S>
This class models the drastic distance measure between interpretations, see [Grant, Hunter. Distance-based Measures of Inconsistency, ECSQARU'13]. It returns 0 if the interpretations are equivalent and 1 otherwise.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description DrasticDistance()
-
Method Summary
Modifier and Type Method Description double
distance(S f, T b)
Measures the distance between a formula and some interpretation by taking the minimal distance from all models of the formula to the given interpretation.double
distance(T a, T b)
Measures the distance between the two given interpretations.
-
-
-
Method Detail
-
distance
public double distance(T a, T b)
Description copied from interface:InterpretationDistance
Measures the distance between the two given interpretations.- Specified by:
distance
in interfaceInterpretationDistance<T extends Interpretation<B,S>,B extends BeliefBase,S extends Formula>
- Parameters:
a
- some interpretationb
- some interpretation- Returns:
- the distance between the two given interpretations.
-
distance
public double distance(S f, T b)
Description copied from interface:InterpretationDistance
Measures the distance between a formula and some interpretation by taking the minimal distance from all models of the formula to the given interpretation.- Specified by:
distance
in interfaceInterpretationDistance<T extends Interpretation<B,S>,B extends BeliefBase,S extends Formula>
- Parameters:
f
- some formulab
- some interpretation.- Returns:
- the distance between the set of models of the formula to the given interpretation.
-
-