Package org.apache.wayang.core.optimizer
Class ProbabilisticIntervalEstimate
java.lang.Object
org.apache.wayang.core.optimizer.ProbabilisticIntervalEstimate
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CardinalityEstimate,LoadEstimate,TimeEstimate
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 Summary
ConstructorsConstructorDescriptionProbabilisticIntervalEstimate(long lowerEstimate, long upperEstimate, double correctnessProb) ProbabilisticIntervalEstimate(long lowerEstimate, long upperEstimate, double correctnessProb, boolean isOverride) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsWithinDelta(ProbabilisticIntervalEstimate that, double probDelta, long lowerEstimateDelta, long upperEstimateDelta) Compares with this instance equals withthatinstance within given delta bounds.static <T extends ProbabilisticIntervalEstimate>
Comparator<T>Creates aComparatorbased on the mean of instances.longdoublelonglonglonginthashCode()booleanisExact()Checks whether this instance is an exact value, i.e., it is a confident single-point estimate.booleanisExactly(long exactEstimate) Checks whether this instance is an exact estimate of the given value.booleantoString()
-
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
Creates aComparatorbased on the mean of instances. -
equals
-
equalsWithinDelta
public boolean equalsWithinDelta(ProbabilisticIntervalEstimate that, double probDelta, long lowerEstimateDelta, long upperEstimateDelta) Compares with this instance equals withthatinstance within given delta bounds. -
isOverride
public boolean isOverride() -
hashCode
public int hashCode() -
toString
-