Package org.apache.wayang.core.optimizer
Class OptimizationUtils
- java.lang.Object
-
- org.apache.wayang.core.optimizer.OptimizationUtils
-
public class OptimizationUtils extends java.lang.Object
Utility 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 allSlot
s that are related to the givenInputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.static java.util.Set<Slot<?>>
collectConnectedSlots(OutputSlot<?> output)
Collects allSlot
s that are related to the givenOutputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.static java.util.Set<Slot<?>>
collectConnectedSlots(Slot<?> slot)
Collects allSlot
s that are related to the givenSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.static <T extends PlanEnumerationPruningStrategy>
TcreatePruningStrategy(java.lang.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.
-
-
-
Method Detail
-
findWayangPlanOutputSlotFor
public static OutputSlot<?> findWayangPlanOutputSlotFor(Channel openChannel)
Determine the producingOutputSlot
of thisChannel
that lies within aWayangPlan
. We follow non-WayangPlanExecutionOperator
s 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 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
public static java.util.Set<Slot<?>> collectConnectedSlots(Slot<?> slot)
Collects allSlot
s that are related to the givenSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.
-
collectConnectedSlots
public static java.util.Set<Slot<?>> collectConnectedSlots(InputSlot<?> input)
Collects allSlot
s that are related to the givenInputSlot
either by aSlotMapping
or byOutputSlot
/InputSlot
occupation.
-
collectConnectedSlots
public static java.util.Set<Slot<?>> collectConnectedSlots(OutputSlot<?> output)
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
-
-