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

API for objects that support rand? #16

Open
oschulz opened this issue Dec 12, 2022 · 4 comments
Open

API for objects that support rand? #16

oschulz opened this issue Dec 12, 2022 · 4 comments

Comments

@oschulz
Copy link
Collaborator

oschulz commented Dec 12, 2022

In relation to the discussion on DiffEqBase and QuasiMonteCarlo in JuliaStats/Distributions.jl#1139 - should have a trait based API for (density-like) objects that support IID sampling, i.e. that support rand (and possibly rand! as well)? This could be part of DensityInterface or it could go into a separate package, but it might be nice to have a community-standard way to ask something "do you support rand?", or maybe even "what do you produce on rand?".

CC @ChrisRackauckas , @devmotion

@devmotion
Copy link
Member

Haven't thought much about it yet, but my initial feeling is that this is a bit orthogonal to the density aspect. Maybe it would be better to add traits (if needed/useful) to Random or RandomExtensions?

@oschulz
Copy link
Collaborator Author

oschulz commented Dec 12, 2022

orthogonal to the density aspect

I agree. Adding it to Random would take time though, and we'd have to have the API "perfect" from the get-go because it would be frozen immediately. Maybe a separate package?

@devmotion
Copy link
Member

devmotion commented Dec 12, 2022

IIRC RandomExtensions was supposed to be some experimental "playground" for Random?

@oschulz
Copy link
Collaborator Author

oschulz commented Dec 12, 2022

Oh, completely overlooked RandomExtensions, lol. Maybe that ties into JuliaStats/Distributions.jl#1139 as well?

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

No branches or pull requests

2 participants