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 entries \(\Bhat\).
Examples
>>> import numpy as np >>> B = opinf.operators.LinearOperator() >>> entries = np.random.random((10, 3)) # Operator entries. >>> 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
Discrete representation of the operator, the matrix \(\Ohat\).
input_dimension
Dimension of the input \(\u\) that the operator acts on.
shape
Shape of the operator entries array.
state_dimension
Dimension 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\B\).
Construct the state Jacobian of the operator.
Load an operator from an HDF5 file.
Column dimension \(m\) of the operator entries.
Save the operator to an HDF5 file.
Set the
entries
attribute.