InputOperator#
- class InputOperator(entries=None)[source]#
Linear input operator \(\Ophat_{\ell}(\qhat,\u) = \Bhat\u\) where \(\Bhat \in \RR^{r \times m}\).
- Parameters:
- entries(r, m) ndarray or None
Operator matrix \(\Bhat\).
Examples
>>> import numpy as np >>> B = opinf.operators.LinearOperator() >>> entries = np.random.random((10, 3)) # Operator matrix. >>> B.set_entries(entries) >>> B.shape (10, 3) >>> u = np.random.random(3) # Input vector. >>> out = B.apply(None, u) # Apply the operator to u. >>> np.allclose(out, entries @ u) True
Properties:- entries#
Operator matrix \(\Bhat\).
- input_dimension#
Dimension \(m\) of the input \(\u\) that the operator acts on.
- shape#
Shape \((r, m)\) of the operator matrix \(\Bhat\).
- state_dimension#
Dimension \(r\) of the state \(\qhat\) that the operator acts on.
Methods:Apply the operator to the given state / input: \(\Ophat_{\ell}(\qhat,\u) = \Bhat\u\).
Return a copy of the operator.
Return the data matrix block corresponding to the operator, the
inputs
.Return the Galerkin projection of the operator, \(\Bhat = (\Wr\trp\Vr)^{-1}\Wr\trp\B\).
Construct the state Jacobian of the operator.
Load an operator from an HDF5 file.
Column dimension \(m\) of the operator matrix \(\Bhat\).
Save the operator to an HDF5 file.
Set the operator matrix \(\Bhat\).
Verify consistency between dimension properties and required methods.