fronts.D.power_law
- fronts.D.power_law(k, a=1.0, epsilon=0.0)
Return a power-law D function.
Given the scalars a, k and \(\varepsilon\), returns a function D defined as:
\[D(\theta) = a\theta^k + \varepsilon\]- Parameters:
- Returns:
D –
Function to evaluate \(D\) and its derivatives:
D(theta)
evaluates and returns \(D\) attheta
D(theta, 1)
returns both the value of \(D\) and its first derivative attheta
D(theta, 2)
returns the value of \(D\), its first derivative, and its second derivative attheta
In all cases, the argument
theta
may be a single float or a NumPy array.- Return type:
callable
Notes
Keep in mind that, depending on the parameters, the returned D does not necessarily map every value of \(\theta\) to a positive value.