Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ Base.@kwdef struct PredictionStateSpace{T, ST <: AbstractStateSpace{T}, KT, QT,
Q::QT = nothing
R::RT = nothing
S::ST2 = nothing
PredictionStateSpace(sys, K, Q=nothing, R=nothing, S=nothing) = new{typeof(sys.timeevol), typeof(sys),typeof(K),typeof(Q),typeof(R),typeof(S)}(sys, K, Q, R, S)
end
PredictionStateSpace(sys, K, Q=nothing, R=nothing, S=nothing) = PredictionStateSpace{typeof(sys.timeevol), typeof(sys),typeof(K),typeof(Q),typeof(R),typeof(S)}(sys, K, Q, R, S)


"""
Expand Down Expand Up @@ -418,6 +418,12 @@ function Base.:(-)(sys0::ST) where ST <: AbstractPredictionStateSpace
ST(typeof(sys)(sys.A, sys.B, -sys.C, -sys.D, sys.timeevol), otherfields...)
end

function Base.:(*)(K::AbstractMatrix, sys0::ST) where ST <: AbstractPredictionStateSpace
otherfields = ntuple(i->getfield(sys0, i+1), fieldcount(ST)-1)
sys = sys0.sys
ST(typeof(sys)(sys.A, sys.B, K*sys.C, K*sys.D, sys.timeevol), otherfields...)
end

"""
N4SIDStateSpace <: AbstractPredictionStateSpace

Expand Down