| resource_power_law | R Documentation |
Internal helper returning the auto-calculated resource power law
\kappa\, w^{-\lambda} on the full size grid, optionally truncated at an
upper cutoff w_max. When the bin_average entry of the model's
second_order_w slot is set, the exact bin average of the power law over
each bin is returned instead (with the bin straddling w_max getting the
partial average), so that the initial resource is the finite-volume cell
average of the background spectrum, consistent with the bin-integrated
encounter convolution that consumes it as a cell average. Otherwise the
left-edge point values are returned, byte-identical to previous mizer.
resource_power_law(params, kappa, lambda, w_max = Inf)
params |
A MizerParams object whose |
kappa |
The coefficient |
lambda |
The exponent so the power law is |
w_max |
Optional upper cutoff. The power law is taken to be zero at and
above |
This is used wherever the background resource spectrum \kappa
w^{-\lambda} is constructed from scratch: the initial resource abundance in
newMultispeciesParams() and the temporary prey spectra used to compute the
default gamma/f0 (get_gamma_default(), get_f0_default()) and the
consumer initial abundances (get_initial_n()). The bin-averaged resource
capacity and rate are produced directly by setResource().
A numeric vector (same length as w_full) of the resource spectrum.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.