Class ProbabilisticIntervalEstimate

java.lang.Object
org.apache.wayang.core.optimizer.ProbabilisticIntervalEstimate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CardinalityEstimate, LoadEstimate, TimeEstimate

public class ProbabilisticIntervalEstimate extends Object implements Serializable
An estimate that is capable of expressing uncertainty. The estimate addresses uncertainty in the estimation process by expressing estimates as intervals and assigning a probability of correctness (in [0, 1]).
See Also:
  • Constructor Details

    • ProbabilisticIntervalEstimate

      public ProbabilisticIntervalEstimate(long lowerEstimate, long upperEstimate, double correctnessProb)
    • ProbabilisticIntervalEstimate

      public ProbabilisticIntervalEstimate(long lowerEstimate, long upperEstimate, double correctnessProb, boolean isOverride)
    • ProbabilisticIntervalEstimate

      public ProbabilisticIntervalEstimate()
  • Method Details

    • getLowerEstimate

      public long getLowerEstimate()
    • getUpperEstimate

      public long getUpperEstimate()
    • getAverageEstimate

      public long getAverageEstimate()
    • getGeometricMeanEstimate

      public long getGeometricMeanEstimate()
    • getCorrectnessProbability

      public double getCorrectnessProbability()
    • isExactly

      public boolean isExactly(long exactEstimate)
      Checks whether this instance is an exact estimate of the given value.
      Parameters:
      exactEstimate - the hypothesized exact estimation value
      Returns:
      whether this instance is exactly exactEstimate
    • isExact

      public boolean isExact()
      Checks whether this instance is an exact value, i.e., it is a confident single-point estimate.
      Returns:
      whether this instance is exact
    • expectationValueComparator

      public static <T extends ProbabilisticIntervalEstimate> Comparator<T> expectationValueComparator()
      Creates a Comparator based on the mean of instances.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • equalsWithinDelta

      public boolean equalsWithinDelta(ProbabilisticIntervalEstimate that, double probDelta, long lowerEstimateDelta, long upperEstimateDelta)
      Compares with this instance equals with that instance within given delta bounds.
    • isOverride

      public boolean isOverride()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object