Class EvaluationInconsistencyListener
- java.lang.Object
-
- net.sf.tweety.logics.commons.analysis.streams.EvaluationInconsistencyListener
-
- All Implemented Interfaces:
java.util.EventListener
,InconsistencyListener
public class EvaluationInconsistencyListener extends java.lang.Object implements InconsistencyListener
An inconsistency listener that is apt for doing evaluations on the performance of an inconsistency measure. Stores runtime and further information in a csv file.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private long
cumulativeTime
Sum of all steps.private java.io.File
file
The file where the results are stored.static double
INCDEFAULTVALUE
private long
lastMillis
The previous timestamp.private int
maxEvents
The maximum number of events this listener listens to an inconsistency measure.private int
numberOfEvents
The current number of events.static double
TOLERANCE
-
Constructor Summary
Constructors Constructor Description EvaluationInconsistencyListener(java.lang.String file, int maxEvents)
-
Method Summary
Modifier and Type Method Description void
inconsistencyMeasurementStarted(InconsistencyUpdateEvent evt)
This method is called by a stream-based inconsistency measure when an inconsistency measurement has started.void
inconsistencyUpdateOccured(InconsistencyUpdateEvent evt)
This method is called by a stream-based inconsistency measure when an update of an inconsistency value occurs.private void
writeToDisk(java.lang.String log)
Writes the given log to disk.
-
-
-
Field Detail
-
file
private java.io.File file
The file where the results are stored.
-
maxEvents
private int maxEvents
The maximum number of events this listener listens to an inconsistency measure. Afterwards this stream processing is aborted and the file is written to disk.
-
numberOfEvents
private int numberOfEvents
The current number of events.
-
lastMillis
private long lastMillis
The previous timestamp.
-
cumulativeTime
private long cumulativeTime
Sum of all steps.
-
INCDEFAULTVALUE
public static double INCDEFAULTVALUE
-
TOLERANCE
public static double TOLERANCE
-
-
Method Detail
-
inconsistencyUpdateOccured
public void inconsistencyUpdateOccured(InconsistencyUpdateEvent evt)
Description copied from interface:InconsistencyListener
This method is called by a stream-based inconsistency measure when an update of an inconsistency value occurs.- Specified by:
inconsistencyUpdateOccured
in interfaceInconsistencyListener
- Parameters:
evt
- some event.
-
writeToDisk
private void writeToDisk(java.lang.String log)
Writes the given log to disk.- Parameters:
log
- some string.
-
inconsistencyMeasurementStarted
public void inconsistencyMeasurementStarted(InconsistencyUpdateEvent evt)
Description copied from interface:InconsistencyListener
This method is called by a stream-based inconsistency measure when an inconsistency measurement has started.- Specified by:
inconsistencyMeasurementStarted
in interfaceInconsistencyListener
- Parameters:
evt
- some event.
-
-