Class InconsistencyMeasureResult

java.lang.Object
org.tweetyproject.logics.commons.analysis.InconsistencyMeasureResult

public class InconsistencyMeasureResult extends Object
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:
  • Method Details

    • timeout

      public static InconsistencyMeasureResult timeout()
      Creates an InconsistencyMeasureResult indicating a timeout.
      Returns:
      an InconsistencyMeasureResult with Status.TIMEOUT.
    • ok

      public static InconsistencyMeasureResult ok(double result)
      Creates an InconsistencyMeasureResult with the given inconsistency value.
      Parameters:
      result - the computed inconsistency value.
      Returns:
      an InconsistencyMeasureResult with Status.OK.
    • getStatus

      Returns the status of the inconsistency measure result.
      Returns:
      the status, either OK or TIMEOUT.
    • 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 is TIMEOUT, the elapsed time remains unchanged.

      Parameters:
      time - the elapsed time in milliseconds.