Skip to content

Commit

Permalink
Merge pull request #147 from baggepinnen/rm_R2d
Browse files Browse the repository at this point in the history
remove unused R2d
  • Loading branch information
baggepinnen authored Nov 11, 2024
2 parents cef9fd8 + 4cb3678 commit dff5be5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/kalman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ function convert_x0_type(μ)
end
end

@with_kw mutable struct KalmanFilter{AT,BT,CT,DT,R1T,R2T,R2DT,D0T,XT,RT,P,αT} <: AbstractKalmanFilter
@with_kw mutable struct KalmanFilter{AT,BT,CT,DT,R1T,R2T,D0T,XT,RT,P,αT} <: AbstractKalmanFilter
A::AT
B::BT
C::CT
D::DT
R1::R1T
R2::R2T
R2d::R2DT
d0::D0T
x::XT
R::RT
Expand Down Expand Up @@ -69,7 +68,7 @@ function KalmanFilter(A,B,C,D,R1,R2,d0=MvNormal(Matrix(R1)); p = SciMLBase.NullP
end
R = convert_cov_type(R1, d0.Σ)
x0 = convert_x0_type(d0.μ)
KalmanFilter(A,B,C,D,R1,R2,MvNormal(Matrix(R2)), d0, x0, R, 1, p, α)
KalmanFilter(A,B,C,D,R1,R2, d0, x0, R, 1, p, α)
end

function Base.propertynames(kf::KF, private::Bool=false) where KF <: AbstractKalmanFilter
Expand Down
6 changes: 2 additions & 4 deletions src/sq_kalman.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
@with_kw mutable struct SqKalmanFilter{AT,BT,CT,DT,R1T,R2T,R2DT,D0T,XT,RT,P,αT} <: AbstractKalmanFilter
@with_kw mutable struct SqKalmanFilter{AT,BT,CT,DT,R1T,R2T,D0T,XT,RT,P,αT} <: AbstractKalmanFilter
A::AT
B::BT
C::CT
D::DT
R1::R1T
R2::R2T
R2d::R2DT
d0::D0T
x::XT
R::RT
Expand Down Expand Up @@ -52,10 +51,9 @@ function SqKalmanFilter(A,B,C,D,R1,R2,d0=MvNormal(Matrix(R1)); p = SciMLBase.Nul
R1 = cholesky(R1).U
R2 = cholesky(R2).U

R2d = convert_cov_type(R2, R2'R2)
x0 = convert_x0_type(d0.μ)

SqKalmanFilter(A,B,C,D,R1,R2,R2d, d0, x0, R, 1, p, α)
SqKalmanFilter(A,B,C,D,R1,R2, d0, x0, R, 1, p, α)
end


Expand Down

0 comments on commit dff5be5

Please sign in to comment.