-
Notifications
You must be signed in to change notification settings - Fork 433
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
Better support for multivariate distributions #496
Comments
This is a good point. My preference is to postpone this until we resolve #290 or have more multi-variate distributions. As mentioned in #485 there might be another solution, if fixing the number of variables at compile-time is sufficient: using generic consts (rust-lang/rust#44580). |
Nice, I did not know const generics were so close! rust-lang/rust#51192 (comment)
|
We now use const generics: Caveat: we currently use Caveat: sometimes arrays of other lengths are required ( Caveat: the above approach does not support run-time variable length Conclusion: we can improve our code once I tried simply copying the code behind |
Closing: #1006 tracks the remaining issues in Dirichlet, and I don't think there's anything else we want for |
The
Distribution
trait does not work well for multivariate distributions, becauseimpl Distribution<Vec<f64>> for Multivariate
requires an allocation for every sample (see #485 for an example). Maybe we should add another trait:With SIMD in mind, this might even make sense for univariate distribution. So we might want to add
sample_multi
to theDistribution
trait.The text was updated successfully, but these errors were encountered: