Skip to content

Commit

Permalink
Add extra docstrings for Kalman module
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-graham committed Dec 17, 2024
1 parent a6b553d commit 609038a
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/kalman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
)
Expand All @@ -40,13 +48,27 @@ 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
)
lmult_by_state_transition_matrix!(state_covar, filter.model, time_index)
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,
Expand Down

0 comments on commit 609038a

Please sign in to comment.