Class WindowInconsistencyMeasurementProcess<S extends Formula>
- java.lang.Object
-
- java.lang.Thread
-
- net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess<S>
-
- net.sf.tweety.logics.commons.analysis.streams.WindowInconsistencyMeasurementProcess<S>
-
- Type Parameters:
S- The type of formulas
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
PlWindowInconsistencyMeasurementProcess
public abstract class WindowInconsistencyMeasurementProcess<S extends Formula> extends InconsistencyMeasurementProcess<S>
This inconsistency measurement process keeps a window of a number of previous formulas in memory and computes the inconsistency value from this window using an ordinary inconsistency measure.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private BinaryFunction<java.lang.Double,java.lang.Double,java.lang.Double>aggIf X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by aggregating X1 and X2 with this function.static java.lang.StringCONFIG_AGGREGATIONFUNCTIONKey for the configuration map that points to the aggregation function used.static java.lang.StringCONFIG_MEASUREKey for the configuration map that points to the inconsistency measure to be used.static java.lang.StringCONFIG_NAMEKey for the configuration map that points to the name to be used.static java.lang.StringCONFIG_WINDOWSIZEKey for the configuration map that points to the window size to be used.private java.util.Queue<S>formulasthe current window of formulasprivate BeliefSetInconsistencyMeasure<S>measureThe inconsistency measure usedprivate java.lang.StringnameThe name of this process.private doublepreviousValueThe previous value of the measure.private intwindowsizeThe window size.-
Fields inherited from class net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess
CONFIG_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description WindowInconsistencyMeasurementProcess()
-
Method Summary
-
Methods inherited from class net.sf.tweety.logics.commons.analysis.streams.InconsistencyMeasurementProcess
abort, getInconsistencyValue, init, run
-
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
-
measure
private BeliefSetInconsistencyMeasure<S extends Formula> measure
The inconsistency measure used
-
windowsize
private int windowsize
The window size.
-
previousValue
private double previousValue
The previous value of the measure.
-
agg
private BinaryFunction<java.lang.Double,java.lang.Double,java.lang.Double> agg
If X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by aggregating X1 and X2 with this function. If none is given the maximum function is assumed.
-
name
private java.lang.String name
The name of this process.
-
CONFIG_MEASURE
public static final java.lang.String CONFIG_MEASURE
Key for the configuration map that points to the inconsistency measure to be used.- See Also:
- Constant Field Values
-
CONFIG_WINDOWSIZE
public static final java.lang.String CONFIG_WINDOWSIZE
Key for the configuration map that points to the window size to be used.- See Also:
- Constant Field Values
-
CONFIG_AGGREGATIONFUNCTION
public static final java.lang.String CONFIG_AGGREGATIONFUNCTION
Key for the configuration map that points to the aggregation function used. If X1 is the previous inconsistency value, X2 is the new inconsistency value on the new window, then the actual new inconsistency value X is determined by aggregating X1 and X2 with this function. If none is given the maximum function is assumed.- See Also:
- Constant Field Values
-
CONFIG_NAME
public static final java.lang.String CONFIG_NAME
Key for the configuration map that points to the name to be used.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
protected void init(java.util.Map<java.lang.String,java.lang.Object> config)
Description copied from class:InconsistencyMeasurementProcessAdditional initialization statements are put here.- Specified by:
initin classInconsistencyMeasurementProcess<S extends Formula>- Parameters:
config- the configuration
-
update
protected double update(S formula)
Description copied from class:InconsistencyMeasurementProcessUpdates the inconsistency value with the new formula.- Specified by:
updatein classInconsistencyMeasurementProcess<S extends Formula>- Parameters:
formula- some formula.- Returns:
- the current inconsistency value.
-
toString
public java.lang.String toString()
- Specified by:
toStringin classInconsistencyMeasurementProcess<S extends Formula>
-
-