Class InconsistencyMeasurementProcess<S extends net.sf.tweety.commons.Formula>

  • Type Parameters:
    S - The type of formulas.
    All Implemented Interfaces:
    Runnable
    Direct Known Subclasses:
    WindowInconsistencyMeasurementProcess

    public abstract class InconsistencyMeasurementProcess<S extends net.sf.tweety.commons.Formula>
    extends Thread
    The actual process of an inconsistency measure on streams.
    Author:
    Matthias Thimm
    • Field Detail

      • CONFIG_TIMEOUT

        public static final String CONFIG_TIMEOUT
        Key for the configuration map that gives a time out (given in seconds) for a single update operation Default value is -1 which means no time out.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InconsistencyMeasurementProcess

        public InconsistencyMeasurementProcess()
        Creates a new process for the given stream.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • init

        protected void init​(net.sf.tweety.commons.streams.FormulaStream<S> stream,
                            StreamBasedInconsistencyMeasure<S> parent,
                            Map<String,​Object> config)
        Initialization statements.
        Parameters:
        stream - some formula stream.
        parent - the measure from where this process has been dispatched.
        config - configuration options for the specific process.
      • init

        protected abstract void init​(Map<String,​Object> config)
        Additional initialization statements are put here.
        Parameters:
        config - the configuration
      • update

        protected abstract double update​(S formula)
        Updates the inconsistency value with the new formula.
        Parameters:
        formula - some formula.
        Returns:
        the current inconsistency value.
      • abort

        public void abort()
        Aborts the measurement of a stream.
      • getInconsistencyValue

        public Double getInconsistencyValue()
        Returns the current inconsistency value of this stream processing or the last value if the stream processing has finalized.
        Returns:
        the current inconsistency value.