apply()

apply()#

AffineInputOperator.apply(parameter, state, input_=None)#

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 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, u)
...           for q, u in zip(list_of_states, list_of_inputs)]
# ...it is faster to do this.
>>> operator_at_parameter = parametric_operator.evaluate(parameter)
>>> values = [operator_at_parameter.apply(q, u)
...           for q, u in zip(list_of_states, list_of_inputs)]