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

Add 4 random distributions trivially derivable from the currently implemented ones. #10859

Merged
merged 5 commits into from
Dec 9, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented Dec 8, 2013

This moves std::rand::distribitions::{Normal, StandardNormal} to ...::distributions::normal, reexporting Normal from distributions (and similarly for Exp and Exp1`), and adds:

  • Log-normal
  • Chi-squared
  • F
  • Student T

all of which are implemented in C++11's random library. Tests in huonw/random-tests@0424b8a. Note that these are approximately half documentation & half implementation (of which a significant portion is boilerplate }'s and so on).

@huonw
Copy link
Member Author

huonw commented Dec 8, 2013

(cc @wycats, got you your log-normal.)

bors added a commit that referenced this pull request Dec 9, 2013
This moves `std::rand::distribitions::{Normal, StandardNormal}` to `...::distributions::normal`, reexporting `Normal` from `distributions` (and similarly for `Exp` and Exp1`), and adds:
- Log-normal
- Chi-squared
- F
- Student T

all of which are implemented in C++11's random library. Tests in huonw/random-tests@0424b8a. Note that these are approximately half documentation & half implementation (of which a significant portion is boilerplate `}`'s and so on).
@bors bors closed this Dec 9, 2013
@bors bors merged commit 705b705 into rust-lang:master Dec 9, 2013
@wycats
Copy link
Contributor

wycats commented Dec 9, 2013

This is great. Thanks so much @huonw.

@huonw huonw deleted the helper-dists branch December 9, 2013 21:09
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 30, 2023
…s, r=giraffate

Bring up Rust lang rust-lang#37612 as a known problem for let_and_return

Fixes rust-lang/rust-clippy#4182.

I don't think conforming to this lint could trigger the issue immediately, only if subsequent code-changes go wrong, but I may be mistaken.

Since the lint can't trigger it by itself, just closing this issue might be reasonable, if not maybe this PR fixes it.

changelog: Update docs for `let_and_return`, mention rust-lang rust-lang#37612
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.

4 participants