fronts.D.power_law(k, a=1, epsilon=0)

Return a power-law D function.

Given the scalars a, k and \(\varepsilon\), returns a function D defined as:

\[D(S) = aS^k + \varepsilon\]
  • k (float) – Exponent

  • a (float) – Constant factor

  • epsilon (float) – \(\varepsilon\), the deviation term


D – Twice-differentiable 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 as D(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



Keep in mind that, depending on the parameters, the returned D does not necessarily map every value of S to a positive value.