fronts.D.power_law¶

fronts.D.
power_law
(k, a=1, epsilon=0)¶ Return a powerlaw D function.
Given the scalars a, k and \(\varepsilon\), returns a function D defined as:
\[D(S) = aS^k + \varepsilon\] Parameters
k (float) – Exponent
a (float) – Constant factor
epsilon (float) – \(\varepsilon\), the deviation term
 Returns
D – Twicedifferentiable function that maps S to values according to the expression. It can be called as
D(S)
to evaluate it at S. It can also be called asD(S, n)
with n equal to 1 or 2, in which case the first n derivatives of the function evaluated at the same S are included (in order) as additional return values. While mathematically a scalar function, D operates in a vectorized fashion with the same semantics when S is a numpy.ndarray. Return type
callable
Notes
Keep in mind that, depending on the parameters, the returned D does not necessarily map every value of S to a positive value.