-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
Add p()
for Bernoulli
#1481
Add p()
for Bernoulli
#1481
Conversation
There should be a way to obtain the probability of `true`.
This does not compile. |
Oh god, I pushed the wrong commit! Sorry, will push an actually working one later! |
CHANGELOG.md
Outdated
@@ -20,6 +20,7 @@ You may also find the [Upgrade Guide](https://rust-random.github.io/book/update. | |||
- Fix portability of `rand::distributions::Slice` (#1469) | |||
- Rename `rand::distributions` to `rand::distr` (#1470) | |||
- The `serde1` feature has been renamed `serde` (#1477) | |||
- Add `p()` for `Bernoulli` to access probability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include the PR: #1481
CHANGELOG.md
entrySummary
Add accessor for
Bernoulli
returning the probbability oftrue
Motivation
There is currently no way to obtain
p
.I'm happy to extend this PR with similiar smale-scale changes for other distributions.