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 allSlots that are related to the givenInputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.collectConnectedSlots(OutputSlot<?> output) Collects allSlots that are related to the givenOutputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.collectConnectedSlots(Slot<?> slot) Collects allSlots that are related to the givenSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.static <T extends PlanEnumerationPruningStrategy>
TcreatePruningStrategy(Class<T> strategyClass, Configuration configuration) Creates a newPlanEnumerationPruningStrategyand configures it.static OutputSlot<?>findWayangPlanOutputSlotFor(Channel openChannel) static ChannelgetPredecessorChannel(Channel channel) static doublelogisticGrowth(double g0, double epsilon, double x0, double x) Uses the right part of the logistic regression curve to model a strictly growing function betweeng0and 1.
-
Constructor Details
-
OptimizationUtils
public OptimizationUtils()
-
-
Method Details
-
findWayangPlanOutputSlotFor
Determine the producingOutputSlotof thisChannelthat lies within aWayangPlan. We follow non-WayangPlanExecutionOperators 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 newPlanEnumerationPruningStrategyand configures it.- Parameters:
strategyClass- theClassof thePlanEnumerationPruningStrategy; must have a default constructorconfiguration- provides any potential configuration values- Returns:
- the configured
PlanEnumerationPruningStrategyinstance
-
collectConnectedSlots
Collects allSlots that are related to the givenSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation. -
collectConnectedSlots
Collects allSlots that are related to the givenInputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation. -
collectConnectedSlots
Collects allSlots that are related to the givenOutputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.- Parameters:
output- whose relatedSlots are requested- Returns:
- the related
Slots 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 betweeng0and 1.- Parameters:
g0- the starting value atx = 0epsilon- the function should have a value>= 1 - epsilonforx >= x0x0- the convergencexvaluex- the actual input value to the function- Returns:
- the function value
-