def gcgtinv(Gk, Cl): """ $(G_kC_{k-1}G_k^T)^{-1}$ """ return np.linalg.inv(et.mtxabat(Gk, Cl))
def covariance_exact(Cl, Kk, Gk): """ Covariance update for exact constraints """ # Rlk = et.mtxabat(Gk, Cl) # return Cl - et.mtxab(Kk, 2*et.mtxab(Gk, Cl) - et.mtxabt(Rlk, Kk)) return et.mtxabat(np.eye(Cl.shape[-1]) - et.mtxab(Kk, Gk), Cl)
def predicted_resid_uncert(Vk, Hk, Cl): """ Uncertainty of the predicted residual $V_k + H_k C_{k-1} H_k^T$ """ return Vk + et.mtxabat(Hk, Cl)
def covariance_full(Cl, Kk, Hk, Vk): """ Full expression for covariance update """ return et.mtxabat(np.eye(Cl.shape[-1]) - et.mtxab(Kk, Hk), Cl) + et.mtxabat(Kk, Vk)
def covariance_exact(Cl, Kk, Gk): """ Covariance update for exact constraints """ return et.mtxabat(np.eye(Cl.shape[-1]) - et.mtxab(Kk, Gk), Cl)