Package org.apache.wayang.core.optimizer
Class OptimizationUtils
- java.lang.Object
-
- org.apache.wayang.core.optimizer.OptimizationUtils
-
public class OptimizationUtils extends java.lang.ObjectUtility methods for the optimization process.
-
-
Constructor Summary
Constructors Constructor Description OptimizationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<Slot<?>>collectConnectedSlots(InputSlot<?> input)Collects allSlots that are related to the givenInputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.static java.util.Set<Slot<?>>collectConnectedSlots(OutputSlot<?> output)Collects allSlots that are related to the givenOutputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.static java.util.Set<Slot<?>>collectConnectedSlots(Slot<?> slot)Collects allSlots that are related to the givenSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.static <T extends PlanEnumerationPruningStrategy>
TcreatePruningStrategy(java.lang.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.
-
-
-
Method Detail
-
findWayangPlanOutputSlotFor
public static OutputSlot<?> findWayangPlanOutputSlotFor(Channel openChannel)
Determine the producingOutputSlotof thisChannelthat lies within aWayangPlan. We follow non-WayangPlanExecutionOperators because they should merely forward data.
-
getPredecessorChannel
public static Channel getPredecessorChannel(Channel channel)
- Parameters:
channel- whose predecessor is requested- Returns:
- the preceeding
Channel
-
createPruningStrategy
public static <T extends PlanEnumerationPruningStrategy> T createPruningStrategy(java.lang.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
public static java.util.Set<Slot<?>> collectConnectedSlots(Slot<?> slot)
Collects allSlots that are related to the givenSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.
-
collectConnectedSlots
public static java.util.Set<Slot<?>> collectConnectedSlots(InputSlot<?> input)
Collects allSlots that are related to the givenInputSloteither by aSlotMappingor byOutputSlot/InputSlotoccupation.
-
collectConnectedSlots
public static java.util.Set<Slot<?>> collectConnectedSlots(OutputSlot<?> output)
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
-
-