Package org.apache.wayang.core.optimizer
Class OptimizationUtils
java.lang.Object
org.apache.wayang.core.optimizer.OptimizationUtils
Utility methods for the optimization process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectConnectedSlots
(InputSlot<?> input) Collects allSlot
s that are related to the givenInputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.collectConnectedSlots
(OutputSlot<?> output) Collects allSlot
s that are related to the givenOutputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.collectConnectedSlots
(Slot<?> slot) Collects allSlot
s that are related to the givenSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.static <T extends PlanEnumerationPruningStrategy>
TcreatePruningStrategy
(Class<T> strategyClass, Configuration configuration) Creates a newPlanEnumerationPruningStrategy
and configures it.static OutputSlot<?>
findWayangPlanOutputSlotFor
(Channel openChannel) static Channel
getPredecessorChannel
(Channel channel) static double
logisticGrowth
(double g0, double epsilon, double x0, double x) Uses the right part of the logistic regression curve to model a strictly growing function betweeng0
and 1.
-
Constructor Details
-
OptimizationUtils
public OptimizationUtils()
-
-
Method Details
-
findWayangPlanOutputSlotFor
Determine the producingOutputSlot
of thisChannel
that lies within aWayangPlan
. We follow non-WayangPlanExecutionOperator
s because they should merely forward data. -
getPredecessorChannel
- Parameters:
channel
- whose predecessor is requested- Returns:
- the preceeding
Channel
-
createPruningStrategy
public static <T extends PlanEnumerationPruningStrategy> T createPruningStrategy(Class<T> strategyClass, Configuration configuration) Creates a newPlanEnumerationPruningStrategy
and configures it.- Parameters:
strategyClass
- theClass
of thePlanEnumerationPruningStrategy
; must have a default constructorconfiguration
- provides any potential configuration values- Returns:
- the configured
PlanEnumerationPruningStrategy
instance
-
collectConnectedSlots
Collects allSlot
s that are related to the givenSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation. -
collectConnectedSlots
Collects allSlot
s that are related to the givenInputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation. -
collectConnectedSlots
Collects allSlot
s that are related to the givenOutputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.- Parameters:
output
- whose relatedSlot
s are requested- Returns:
- the related
Slot
s including the givenOutputSlot
-
logisticGrowth
public static double logisticGrowth(double g0, double epsilon, double x0, double x) Uses the right part of the logistic regression curve to model a strictly growing function betweeng0
and 1.- Parameters:
g0
- the starting value atx = 0
epsilon
- the function should have a value>= 1 - epsilon
forx >= x0
x0
- the convergencex
valuex
- the actual input value to the function- Returns:
- the function value
-