Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use abstract array where possible #36

Merged
merged 5 commits into from
May 31, 2019
Merged

use abstract array where possible #36

merged 5 commits into from
May 31, 2019

Conversation

kleinschmidt
Copy link
Member

This widens type signatures in a bunch of places where Matrix is hardcoded to be AbstractMatrix, and adds type parameters to the Normal[Inverse]Wishart structs that record the types of the mean and covariance matrix fields.

I did this primarily to support StaticArrays, which gives me large speed ups when doing lots of posterior calculations (as in my particle filter code). The support isn't perfect, because in a number of places we fall back to Distributions.jl PDMats.jl, both of which hard-code something more specific than AbstractMatrix in a number of places. But it does get the posterior updates correct.

@mschauer mschauer self-assigned this Jan 11, 2019
@mschauer
Copy link
Member

What is the use of the conversions/casts, convert(AbstractMatrix, ...) and AbstractMatrix(...)?

@kleinschmidt
Copy link
Member Author

kleinschmidt commented Jan 15, 2019 via email

@mschauer
Copy link
Member

Ok, makes sense, just check the issue with convert/constructor calls.

@mschauer
Copy link
Member

Ahem, actually, I should know... JuliaLang/julia#24595 (comment)

@mschauer
Copy link
Member

mschauer commented Mar 3, 2019

Merging shortly.

@kleinschmidt
Copy link
Member Author

If you're okay with it go ahead. I lost track of this and can't remember if you still thought changes were necessary. Feel free to update as you see fit!

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.

2 participants