Skip to content

refactor: parametric filter and model types + StaticArrays test suite#58

Open
jamgochiana wants to merge 1 commit into
masterfrom
arec/parametric-types-and-staticarrays
Open

refactor: parametric filter and model types + StaticArrays test suite#58
jamgochiana wants to merge 1 commit into
masterfrom
arec/parametric-types-and-staticarrays

Conversation

@jamgochiana

Copy link
Copy Markdown
Collaborator

Closes #22, closes #10, closes #47

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.

@jamgochiana jamgochiana force-pushed the arec/parametric-types-and-staticarrays branch from 059fb95 to b3bf81b Compare May 27, 2026 20:06
@jamgochiana jamgochiana force-pushed the arec/identity-covariance branch from 2b2840d to 7f2341f Compare May 27, 2026 20:06
Base automatically changed from arec/identity-covariance to master May 27, 2026 20:21
…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
@jamgochiana jamgochiana force-pushed the arec/parametric-types-and-staticarrays branch from b3bf81b to fbac0ec Compare May 27, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add StaticArrays.jl support and tests All struct fields should be concrete types Parameterize abstract filters

1 participant