Class InconsistencyMeasureResult
java.lang.Object
org.tweetyproject.logics.commons.analysis.InconsistencyMeasureResult
This class represents the results the result of a call to an inconsistency measure
with a knowledge base, i.e. the inconsistency value, if found, the computation
time and the timeout status.
- Author:
- Anna Gessler
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the status of anInconsistencyMeasureResult. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time elapsed during the computation, in milliseconds.Returns the status of the inconsistency measure result.doublegetValue()Returns the computed inconsistency value.static InconsistencyMeasureResultok(double result) Creates anInconsistencyMeasureResultwith the given inconsistency value.voidsetElapsedTime(long time) Sets the elapsed time for the computation.static InconsistencyMeasureResulttimeout()Creates anInconsistencyMeasureResultindicating a timeout.
-
Method Details
-
timeout
Creates anInconsistencyMeasureResultindicating a timeout.- Returns:
- an
InconsistencyMeasureResultwithStatus.TIMEOUT.
-
ok
Creates anInconsistencyMeasureResultwith the given inconsistency value.- Parameters:
result- the computed inconsistency value.- Returns:
- an
InconsistencyMeasureResultwithStatus.OK.
-
getStatus
Returns the status of the inconsistency measure result.- Returns:
- the status, either
OKorTIMEOUT.
-
getValue
public double getValue()Returns the computed inconsistency value.If the status is
TIMEOUT, this value will be -1.0.- Returns:
- the inconsistency value.
-
getElapsedTime
public long getElapsedTime()Returns the time elapsed during the computation, in milliseconds.If the status is
TIMEOUT, the elapsed time may not be meaningful.- Returns:
- the elapsed time in milliseconds.
-
setElapsedTime
public void setElapsedTime(long time) Sets the elapsed time for the computation.This method only has an effect if the status is
OK. If the status isTIMEOUT, the elapsed time remains unchanged.- Parameters:
time- the elapsed time in milliseconds.
-