apply()#

InterpolatedCubicOperator.apply(parameter, state, input_)#

Apply the operator to the given state and input at the specified parameter value, \(\Ophat_\ell(\qhat,\u;\bfmu)\).

Parameters
parameter(p,) ndarray or float

Parameter value.

state(r,) ndarray

State vector.

input_(m,) ndarray or float or None

Input vector.

Returns
(r,) ndarray

Notes

For repeated apply() calls with the same parameter value, use evaluate() to first get the nonparametric operator corresponding to the parameter value.

# Instead of this...
>>> values = [parametric_operator.apply(parameter, q, input_)
...           for q in list_of_states]
# ...it is faster to do this.
>>> operator_at_parameter = parametric_operator.evaluate(parameter)
>>> values = [operator_at_parameter.apply(q, input_)
...           for q in list_of_states]