refactor: parametric filter and model types + StaticArrays test suite#58
Open
jamgochiana wants to merge 1 commit into
Open
refactor: parametric filter and model types + StaticArrays test suite#58jamgochiana wants to merge 1 commit into
jamgochiana wants to merge 1 commit into
Conversation
This was referenced May 26, 2026
059fb95 to
b3bf81b
Compare
2b2840d to
7f2341f
Compare
…uite
Make struct fields concrete-parametric to eliminate type instability:
- KalmanFilter, ExtendedKalmanFilter, UnscentedKalmanFilter now carry
dynamics/observation model type parameters instead of holding the
abstract supertype fields.
- Measurement, Dynamics, Spawn, PHDFilter now bind concrete matrix /
vector / function types via parametric field types.
- ExtendedKalmanFilter inner constructor preserves the existing
'use kf over ekf' guard while operating with type parameters.
- UnscentedKalmanFilter no longer falls back to Int8 sentinel
parameters; convenience constructors forward to the parametric one
and let promotion infer the types.
Add StaticArrays test suite covering KF, EKF, and UKF end-to-end with
SVector/SMatrix inputs, verifying the package works with stack-allocated
arrays now that the model/filter structs are concrete-typed.
GaussianMixture's struct signature is intentionally left as-is
because Vector{GaussianMixture} operations in src/gmphd.jl rely on
the existing parametric layout — tightening it broke the GM-PHD
update loop.
Closes #22, closes #10, closes #47
b3bf81b to
fbac0ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22, closes #10, closes #47
Make struct fields concrete-parametric to eliminate type instability:
KalmanFilter,ExtendedKalmanFilter,UnscentedKalmanFilternow carry dynamics/observation model type parameters instead of holding the abstract supertype fields.Measurement,Dynamics,Spawn,PHDFilternow bind concrete matrix / vector / function types via parametric field types.ExtendedKalmanFilterinner constructor preserves the existing 'use kf over ekf' guard while operating with type parameters.UnscentedKalmanFilterno longer falls back to Int8 sentinel parameters; convenience constructors forward to the parametric one and let promotion infer the types.Add StaticArrays test suite covering KF, EKF, and UKF end-to-end with
SVector/SMatrixinputs, verifying the package works with stack-allocated arrays now that the model/filter structs are concrete-typed.GaussianMixture's struct signature is intentionally left as-is becauseVector{GaussianMixture}operations insrc/gmphd.jlrely on the existing parametric layout — tightening it broke the GM-PHD update loop.