bayespecon._ops.kron_solve_vec

bayespecon._ops.kron_solve_vec(Lo, Ld, b, n)[source]

Solve \((L_o \otimes L_d)\,\eta = b\) via two \(n \times n\) sparse solves.

Uses the vec-permutation identity \((L_o \otimes L_d)\operatorname{vec}(H) = \operatorname{vec}(L_d H L_o^\top)\):

  1. \(H' = L_d^{-1} H_b\)

  2. \(Z = L_o^{-1} H'^{\,\top}\) (i.e. solve \(L_o Z = H'^\top\))

  3. \(\eta = \operatorname{vec}(Z^\top)\)

Parameters:
Lo : scipy.sparse.csr_matrix, shape (n, n)

Factor matrices \(L_o = I_n - \rho_o W\) and \(L_d = I_n - \rho_d W\).

Ld : scipy.sparse.csr_matrix, shape (n, n)

Factor matrices \(L_o = I_n - \rho_o W\) and \(L_d = I_n - \rho_d W\).

b

n : int

Number of spatial units.

Returns:

eta

Return type:

ndarray, shape (N,)