Mirrors the Numerics linear, power, segmented power, composite, and ensemble function
surfaces. A character type keeps the compact linear and power interface. A list type is a
shared function spec and parameters is then the evaluation vector. Composite specs contain
nested functions and optional weights and mode. Ensemble specs contain a template,
parameter_sets, and either sample_index or sample_percentile.
Usage
univariate_function(
type,
parameters,
x = NULL,
inverse = FALSE,
is_inverse = FALSE,
confidence_level = NULL
)Arguments
- type
"linear","power", or"segmented_power", matched case-insensitively, or a shared function spec list.- parameters
a numeric parameter vector for a character
type. For a spec list, the values at which to evaluate the function.- x
optional numeric values at which to evaluate a spec list. For a character
type, the values at which to evaluate the function or inverse function.- inverse
if
TRUE, evaluates the inverse function (InverseFunction()) instead of the forward function (Function()).- is_inverse
"power"-only:PowerFunction's ownIsInverseproperty. An error fortype = "linear".- confidence_level
if given, evaluates the non-deterministic path at this quantile level; if
NULL(default), evaluates deterministically.
Details
Linear and power functions support optional normally distributed noise via confidence_level.
is_inverse (PowerFunction's own
IsInverse switch) selects which of the forward power law or its algebraic inverse
Function()/inverse = TRUE evaluates – an independent axis from inverse itself, which
picks Function() vs. InverseFunction() on whichever of the two is_inverse selects.