From 609038a3c09c75c2498d0fc82d9dc496368bf6e5 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Tue, 17 Dec 2024 10:01:03 +0000 Subject: [PATCH] Add extra docstrings for Kalman module --- src/kalman.jl | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/kalman.jl b/src/kalman.jl index cb8b43c..3396080 100644 --- a/src/kalman.jl +++ b/src/kalman.jl @@ -4,7 +4,10 @@ using LinearAlgebra using PDMats using ParticleDA -"""Compute `matrix = state_transition_matrix * matrix`.""" +""" + lmult_by_state_transition_matrix!(matrix::AbstractMatrix, model, time_index) + +Compute `matrix = state_transition_matrix * matrix`.""" function lmult_by_state_transition_matrix!( matrix::AbstractMatrix, model, time_index ) @@ -15,7 +18,12 @@ function lmult_by_state_transition_matrix!( end end -"""Compute `output_matrix = observation_matrix * rhs_matrix`.""" +""" + lmult_by_observation_matrix!( + output_matrix::AbstractMatrix, rhs_matrix::AbstractMatrix, model + ) + +Compute `output_matrix = observation_matrix * rhs_matrix`.""" function lmult_by_observation_matrix!( output_matrix::AbstractMatrix, rhs_matrix::AbstractMatrix, model ) @@ -40,6 +48,13 @@ struct MatrixFreeKalmanFilter <: AbstractKalmanFilter model end +""" + pre_and_postmultiply_by_state_transition_matrix!( + state_covar::Matrix, filter::MatrixFreeKalmanFilter, time_index::Int + ) + +Compute `state_covar = transition_matrix * state_covar * transition_matrix'`. +""" function pre_and_postmultiply_by_state_transition_matrix!( state_covar::Matrix, filter::MatrixFreeKalmanFilter, time_index::Int ) @@ -47,6 +62,13 @@ function pre_and_postmultiply_by_state_transition_matrix!( lmult_by_state_transition_matrix!(state_covar', filter.model, time_index) end +""" + pre_and_postmultiply_by_state_transition_matrix!( + state_covar::Matrix, filter::MatrixFreeKalmanFilter, time_index::Int + ) + +Compute `observation_covar = observation_matrix * state_covar * observation_matrix'`. +""" function pre_and_postmultiply_by_observation_matrix!( state_observation_covar::Matrix, observation_covar::Matrix,