Package org.apache.wayang.profiler.log
Class DynamicLoadEstimator
java.lang.Object
org.apache.wayang.core.optimizer.costs.LoadEstimator
org.apache.wayang.profiler.log.DynamicLoadEstimator
Adjustable
LoadProfileEstimator
implementation.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.wayang.core.optimizer.costs.LoadEstimator
LoadEstimator.SinglePointEstimationFunction
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DynamicLoadEstimator
Instance that always estimates a load of0
.Fields inherited from class org.apache.wayang.core.optimizer.costs.LoadEstimator
nullCardinalityReplacement, UNSPECIFIED_NUM_SLOTS
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicLoadEstimator
(DynamicLoadEstimator.SinglePointEstimator singlePointEstimator, Function<Individual, String> specificationBuilder, Collection<Variable> employedVariables) Creates a new instance.DynamicLoadEstimator
(DynamicLoadEstimator.SinglePointEstimator singlePointEstimator, Function<Individual, String> specificationBuilder, Variable... employedVariables) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncalculate
(EstimationContext context) Calculate theLoadEstimate
.static DynamicLoadEstimator
createFor
(String templateKey, String resource, String expression, OptimizationSpace optimizationSpace) Parses a mathematical expression and provides it as aLoadEstimator.SinglePointEstimationFunction
.Get theVariable
s used in this instance.toMathEx
(Individual individual) Creates a MathEx expression reflecting this instance under the configuration specified by anIndividual
.Methods inherited from class org.apache.wayang.core.optimizer.costs.LoadEstimator
calculateJointProbability, createFallback, enumerateCombinations, replaceNullCardinality
-
Field Details
-
zeroLoad
Instance that always estimates a load of0
.
-
-
Constructor Details
-
DynamicLoadEstimator
public DynamicLoadEstimator(DynamicLoadEstimator.SinglePointEstimator singlePointEstimator, Function<Individual, String> specificationBuilder, Variable... employedVariables) Creates a new instance.- Parameters:
singlePointEstimator
- theDynamicLoadEstimator.SinglePointEstimator
to usespecificationBuilder
- creates a MathEx specification for the new instance with the parameters from anIndividual
employedVariables
- theVariable
s appearing in thesinglePointEstimator
-
DynamicLoadEstimator
public DynamicLoadEstimator(DynamicLoadEstimator.SinglePointEstimator singlePointEstimator, Function<Individual, String> specificationBuilder, Collection<Variable> employedVariables) Creates a new instance.- Parameters:
singlePointEstimator
- theDynamicLoadEstimator.SinglePointEstimator
to useemployedVariables
- theVariable
s appearing in thesinglePointEstimator
-
-
Method Details
-
createFor
public static DynamicLoadEstimator createFor(String templateKey, String resource, String expression, OptimizationSpace optimizationSpace) Parses a mathematical expression and provides it as aLoadEstimator.SinglePointEstimationFunction
.- Parameters:
templateKey
- of theexpression
resource
- that is being estimatedexpression
- a mathematical expressionoptimizationSpace
- in which newVariable
s should be created- Returns:
- the
LoadEstimator.SinglePointEstimationFunction
-
calculate
Description copied from class:LoadEstimator
Calculate theLoadEstimate
.- Specified by:
calculate
in classLoadEstimator
- Parameters:
context
- within that theLoadEstimate
should be calculated- Returns:
- the
LoadEstimate
-
toMathEx
Creates a MathEx expression reflecting this instance under the configuration specified by anIndividual
.- Parameters:
individual
- specifies values of the employedVariable
s- Returns:
- the MathEx expression
-
getEmployedVariables
Get theVariable
s used in this instance.- Returns:
- the
Variable
s
-