filtron / MarkovKernels.jl

Marginal distributions and Markov kernels that play nice with each other for the purpose of Bayesian state estimation.
MIT License
17 stars 2 forks source link

Make sym explicit #28

Closed filtron closed 2 years ago

filtron commented 2 years ago
  1. Enforcing Symmetric / Hermitian for covariance matrices of type AbstractMatrix turns out to be necessary.
  2. Compromise is to define:

const CovarianceParameter{T} = Union{Symmetric{T}, Hermitian{T}, UniformScaling{T}, Factorization{T}} where {T}

and add AbstractMatrix constructors for Normal / NormalKernel that check that the covariance is sym/herm before wrapping.

codecov-commenter commented 2 years ago

Codecov Report

Base: 83.50% // Head: 84.51% // Increases project coverage by +1.01% :tada:

Coverage data is based on head (7a89730) compared to base (2c318ec). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #28 +/- ## ========================================== + Coverage 83.50% 84.51% +1.01% ========================================== Files 13 13 Lines 291 310 +19 ========================================== + Hits 243 262 +19 Misses 48 48 ``` | [Impacted Files](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+) | Coverage Δ | | |---|---|---| | [src/distributions/dirac.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL2Rpc3RyaWJ1dGlvbnMvZGlyYWMuamw=) | `93.33% <ø> (ø)` | | | [src/MarkovKernels.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL01hcmtvdktlcm5lbHMuamw=) | `100.00% <100.00%> (ø)` | | | [src/distributions/normal.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL2Rpc3RyaWJ1dGlvbnMvbm9ybWFsLmps) | `98.03% <100.00%> (+0.42%)` | :arrow_up: | | [src/invert.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL2ludmVydC5qbA==) | `100.00% <100.00%> (ø)` | | | [src/kernels/normalkernel.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL2tlcm5lbHMvbm9ybWFsa2VybmVsLmps) | `91.42% <100.00%> (+2.96%)` | :arrow_up: | | [src/matrix\_utilities.jl](https://codecov.io/gh/filtron/MarkovKernels.jl/pull/28/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+#diff-c3JjL21hdHJpeF91dGlsaXRpZXMuamw=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Filip+Tronarp+)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.