Class StreamBasedInconsistencyMeasure<S extends Formula>
java.lang.Object
org.tweetyproject.logics.commons.analysis.BeliefSetInconsistencyMeasure<S>
org.tweetyproject.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 org.tweetyproject.logics.commons.analysis.InconsistencyMeasure
MEASURE_TOLERANCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
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 Double
inconsistencyMeasure
(Collection<S> formulas) This method measures the inconsistency of the given set of formulas.abstract void
Remove a listener from this measure.Methods inherited from class org.tweetyproject.logics.commons.analysis.BeliefSetInconsistencyMeasure
inconsistencyMeasure
-
Constructor Details
-
StreamBasedInconsistencyMeasure
public StreamBasedInconsistencyMeasure()
-
-
Method Details
-
inconsistencyMeasure
Description copied from class:BeliefSetInconsistencyMeasure
This method measures the inconsistency of the given set of formulas.- Specified by:
inconsistencyMeasure
in 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
Add a listener to this measure.- Parameters:
listener
- the listener to be added.
-
removeInconsistencyListener
Remove a listener from this measure.- Parameters:
listener
- the listener to be removed.
-