Skip to content

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Jul 10, 2024

Move Beta, Student's t, Fisher-F and Chi-squared distributions to their own modules.

All recently added distributions (including the very minimal circle/disc/ball/sphere distributions) use their own module, and I find this makes PR reviews easier.

@dhardy dhardy requested a review from MichaelOwenDyer July 10, 2024 09:00
Copy link
Member

@MichaelOwenDyer MichaelOwenDyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change, I think one module per distribution is easier to keep a clear view over than when they are grouped together. I have a few thoughts/suggestions:

  • Nearly all distributions define a type called Error which then gets re-exported with the name of the distribution prepended on, but these new modules define the error type name already with the distribution name in them. I would suggest staying consistent here.
  • Might want to give the same treatment to Zeta and Zipf
  • StudentT might deserve its own error type (alias), but this is definitely less important

Copy link
Member

@MichaelOwenDyer MichaelOwenDyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes, looks good to me now!

@dhardy dhardy merged commit d17ce4e into rust-random:master Jul 11, 2024
@dhardy dhardy deleted the gamma branch July 12, 2024 08:46
benjamin-lieser pushed a commit to benjamin-lieser/rand that referenced this pull request Feb 5, 2025
Move Beta, Student's t, Fisher-F, Chi-squared and Zeta distributions
to their own modules.
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