sisl/GaussianFilters.jl

Parameterize abstract filters

Opened this issue · 1 comments

function predict(b0::GaussianBelief, u::Vector{a},
filter::ExtendedKalmanFilter) where a<:Number
# Motion update
# Linear motion
if filter.d isa LinearDynamicsModel

ExtendedKalmanFilter should be parameterized by DynamicsModel and ObservationModel types.

Parameterizing by the DynamicsModel and ObservationModel types will indeed yield significant performance improvement, but these parameters need not be present in function signatures, for example:

 function predict(b0::GaussianBelief, u::AbstractVector, filter::ExtendedKalmanFilter)

will have identical performance to

 function predict(b0::GaussianBelief, u::Vector{a}, filter::ExtendedKalmanFilter) where a<:Number

as you have now