Package ffx.numerics.switching
Interface UnivariateSwitchingFunction
- All Superinterfaces:
UnivariateDiffFunction
- All Known Implementing Classes:
BellCurveSwitch
,CompositeSwitch
,ConstantSwitch
,LinearDerivativeSwitch
,MultiplicativeSwitch
,PowerSwitch
,SquaredTrigSwitch
A UnivariateSwitchingFunction describes a function of a single value (often lambda), where f(lb) =
0, f(ub) = 1, and df(x)/dx >= 0 for all x lb-ub.
Additionally, it's often useful for switching functions to have zero first and second derivatives at the lower and upper bound.
A number of methods exist to check for various properties of a switching function; these will often be implemented as simple return-boolean methods.
- Author:
- Jacob M. Litman, Michael J. Schnieders
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Remains 0 below the lower bound, and 1 above the upper bound (i.e. a multiplicative switch).int
The highest-order derivative that is zero at the bounds.double
Gets the one bound, where f(x) becomes one.double
Gets the zero bound, where f(x) becomes zero.default int
Returns the highest-order, guaranteed-zero derivative at the zero bound.boolean
True if f(lb + delta) + f(ub - delta) = 1 for all delta between 0 and (ub - lb).boolean
Remains in the range 0-1 outside the bounds.Methods inherited from interface ffx.numerics.func1d.UnivariateDiffFunction
firstDerivative, nthDerivative, secondDerivative, valueAt
-
Method Details
-
constantOutsideBounds
boolean constantOutsideBounds()Remains 0 below the lower bound, and 1 above the upper bound (i.e. a multiplicative switch).- Returns:
- df(x)/dx is zero outside range lb-ub.
-
getHighestOrderZeroDerivative
int getHighestOrderZeroDerivative()The highest-order derivative that is zero at the bounds.- Returns:
- Maximum order zero derivative at bounds.
-
getOneBound
double getOneBound()Gets the one bound, where f(x) becomes one.- Returns:
- One bound
-
getZeroBound
double getZeroBound()Gets the zero bound, where f(x) becomes zero.- Returns:
- Zero bound
-
highestOrderZeroDerivativeAtZeroBound
default int highestOrderZeroDerivativeAtZeroBound()Returns the highest-order, guaranteed-zero derivative at the zero bound.- Returns:
- Highest-order zero derivative at zero bound.
-
symmetricToUnity
boolean symmetricToUnity()True if f(lb + delta) + f(ub - delta) = 1 for all delta between 0 and (ub - lb). For example, a power switch with beta 1 is symmetric to unity, as f(l) + f(1-l) = 1, but beta 2 produces a non-unity result, where f(0.5) + f(0.5) = 0.5.- Returns:
- If symmetry produces unity result.
-
validOutsideBounds
boolean validOutsideBounds()Remains in the range 0-1 outside the bounds. Implied to be true if constantOutsideBounds is true.- Returns:
- min(f ( x)) = 0 and max(f(x)) = 1.
-