datablock()#
- AffineConstantOperator.datablock(parameters, states, inputs=None) ndarray #
Return the data matrix block corresponding to the operator.
For affine operators \(\Ophat_{\ell}(\qhat,\u;\bfmu) = \Ohat_{\ell}(\bfmu)\d_{\ell}(\qhat,\u)\) with \(\Ohat_{\ell}(\bfmu)\in\RR^{r\times d}\) and \(\d_{\ell}(\qhat,\u)\in\RR^{d}\), this is the block matrix
\[\begin{split}\D_{\ell}\trp = \left[\begin{array}{ccc} \theta_{\ell}^{(0)}\!(\bfmu_{0})\, \d_{\ell}(\Qhat_{0},\U_{0}) & \cdots & \theta_{\ell}^{(0)}\!(\bfmu_{s-1})\, \d_{\ell}(\Qhat_{s-1},\U_{s-1}) \\ \vdots & & \vdots \\ \theta_{\ell}^{(A_{\ell})}\!(\bfmu_{0})\, \d_{\ell}(\Qhat_{0},\U_{0}) & \cdots & \theta_{\ell}^{(A_{\ell})}\!(\bfmu_{s-1})\, \d_{\ell}(\Qhat_{s-1},\U_{s-1}) \end{array}\right] \in \RR^{A_{\ell}d \times \sum_{i=0}^{s-1}k_i}\end{split}\]where \(\Qhat_{i} = [~\qhat_{i,0}~~\cdots~~\qhat_{i,k_i-1}] \in \RR^{r \times k_i}\) and \(\U_{i} = [~\u_{i,0}~~\cdots~~\u_{i,k_i-1}] \in \RR^{m\times k_i}\) are the state snapshots and inputs corresponding to training parameter value \(\bfmu_i\in\RR^{p}\), \(i = 0, \ldots, s-1\), where \(s\) is the number of training parameter values. The notation \(\d_{\ell}(\Qhat_{i},\U_{i})\) is shorthand for the matrix
\[\d(\Qhat_{i},\U_{i}) = \left[\begin{array}{ccc} \d_{\ell}(\qhat_{i,0},\u_{i,0}) & \cdots & \d_{\ell}(\qhat_{i,k_i-1},\u_{i,k_i-1}) \end{array}\right] \in \RR^{d \times k_i}.\]- Parameters:
- parameters(s, p) ndarray
Traning parameter values \(\bfmu_{0},\ldots,\bfmu_{s-1}.\)
- stateslist of s (r, k) ndarrays
State snapshots for each of the \(s\) training parameter values, i.e., \(\Qhat_{0},\ldots,\Qhat_{s-1}.\)
- inputslist of s (m, k)-or-(k,) ndarrays or None
Inputs corresponding to the state snapshots, i.e., \(\U_{0},\ldots,\U_{s-1}.\) If each input matrix is 1D, it is assumed that \(m = 1.\)
- Returns:
- block(D, K) ndarray
Data block for the affine operator. Here, \(D = A_{\ell}d(r,m)\) and \(K = \sum_{i=0}^{s-1}k_i\) is the total number of snapshots.