Class StreamBasedInconsistencyMeasure<S extends Formula>
- java.lang.Object
-
- net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure<S>
-
- net.sf.tweety.logics.commons.analysis.streams.StreamBasedInconsistencyMeasure<S>
-
- Type Parameters:
S- The type of formulas
- All Implemented Interfaces:
PostulateEvaluatable<S>,InconsistencyMeasure<BeliefSet<S,?>>
- Direct Known Subclasses:
DefaultStreamBasedInconsistencyMeasure
public abstract class StreamBasedInconsistencyMeasure<S extends Formula> extends BeliefSetInconsistencyMeasure<S>
General interface for inconsistency measures working on streams.- Author:
- Matthias Thimm
-
-
Field Summary
-
Fields inherited from interface net.sf.tweety.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description StreamBasedInconsistencyMeasure()
-
Method Summary
Modifier and Type Method Description abstract voidaddInconsistencyListener(InconsistencyListener listener)Add a listener to this measure.abstract InconsistencyMeasurementProcess<S>getInconsistencyMeasureProcess(FormulaStream<S> stream)Processes the formulas in the given stream one after the other.abstract java.lang.DoubleinconsistencyMeasure(java.util.Collection<S> formulas)This method measures the inconsistency of the given set of formulas.abstract voidremoveInconsistencyListener(InconsistencyListener listener)Remove a listener from this measure.-
Methods inherited from class net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure
-
-
-
-
Method Detail
-
inconsistencyMeasure
public abstract 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.
-
getInconsistencyMeasureProcess
public abstract InconsistencyMeasurementProcess<S> getInconsistencyMeasureProcess(FormulaStream<S> stream)
Processes the formulas in the given stream one after the other. After each update an event of type "InconsistencyUpdateEvent" is created and listeners are notified. This method creates and starts a new object of type "InconsistencyMeasurementProcess" that processes the stream in a separate thread, and returns it. The current value of inconsistency can be retrieved by the "getInconsistencyValue()" of that process and measurement can be aborted by calling its "abort()" method.- Parameters:
stream- some formula stream.- Returns:
- an inconsistency measurement process.
-
addInconsistencyListener
public abstract void addInconsistencyListener(InconsistencyListener listener)
Add a listener to this measure.- Parameters:
listener- the listener to be added.
-
removeInconsistencyListener
public abstract void removeInconsistencyListener(InconsistencyListener listener)
Remove a listener from this measure.- Parameters:
listener- the listener to be removed.
-
-