Class InconsistencyMeasurementProcess<S extends net.sf.tweety.commons.Formula>
- java.lang.Object
-
- java.lang.Thread
-
- net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess<S>
-
- 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_TIMEOUTKey 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.-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description InconsistencyMeasurementProcess()Creates a new process for the given stream.
-
Method Summary
Modifier and Type Method Description voidabort()Aborts the measurement of a stream.DoublegetInconsistencyValue()Returns the current inconsistency value of this stream processing or the last value if the stream processing has finalized.protected abstract voidinit(Map<String,Object> config)Additional initialization statements are put here.protected voidinit(net.sf.tweety.commons.streams.FormulaStream<S> stream, StreamBasedInconsistencyMeasure<S> parent, Map<String,Object> config)Initialization statements.voidrun()abstract StringtoString()protected abstract doubleupdate(S formula)Updates the inconsistency value with the new formula.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
-
-
-
-
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
-
-
Method Detail
-
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.
-
-