Skip to content

Commit

Permalink
small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelJuillard committed Dec 16, 2022
1 parent 9a6ed71 commit dd0e4e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/kalman_base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function get_updated_Finfnull1!(a, Pinf, Pstar, ZPstar, cholF, Fstar, Z, H, T, K
# a = T(a + K'*v)
update_a!(a, K, v, a1, T)
# Pinf = T*Pinf*T'
update_P!(Pinf, T, Pinf, Ptmp)
update_P!(Pinf, T, Ptmp)
# Pstar = T*(Pstar - K'*Z*Pstar)*T'+ QQ
update_P!(Pstar, T, QQ, K, ZPstar, Ptmp)
end
Expand Down Expand Up @@ -696,8 +696,14 @@ function update_P!(P::AbstractArray{U}, T::AbstractArray{U}, Ptt::AbstractArray{
mul!(P, T, Ptmp, 1.0, 1.0)
end

# Pinf = T*Pinftt*T'
# P = T*P*T'
function update_P!(P::AbstractArray{U}, T::AbstractArray{U}, Ptmp::AbstractArray{U}) where {U<:AbstractFloat}
mul!(Ptmp, P, transpose(T))
mul!(P, T, Ptmp)
end

# Pinf = T*Pinftt*T'
function update_P!(P::AbstractArray{U}, T::AbstractArray{U}, Ptt::AbstractArray, Ptmp::AbstractArray{U}) where {U<:AbstractFloat}
mul!(Ptmp, Ptt, transpose(T))
mul!(P, T, Ptmp)
end
Expand Down

0 comments on commit dd0e4e8

Please sign in to comment.