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
  • Constructor Details

    • StreamBasedInconsistencyMeasure

      public StreamBasedInconsistencyMeasure()
  • Method Details

    • inconsistencyMeasure

      public abstract Double inconsistencyMeasure(Collection<S> formulas)
      Description copied from class: BeliefSetInconsistencyMeasure
      This method measures the inconsistency of the given set of formulas.
      Specified by:
      inconsistencyMeasure in class BeliefSetInconsistencyMeasure<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.