Skip to content

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Sep 12, 2025

I rebased #15 (non-trivial). It compiles and passes tests but might warrant a better review.

CC @MortenLohne

…wing it to be used with a dynamic number of parameters
@benjamin-lieser
Copy link
Member

So we want to remove the const generic version?
I am slightly in favor of having both versions, we already have the ConstMultiDistribution

@dhardy
Copy link
Member Author

dhardy commented Sep 12, 2025

I don't really have a preference here — but is there a use-case for the const-generic version?

@benjamin-lieser
Copy link
Member

I don't think at the moment, if there is they can make a PR I guess.

}
}

/// Construct a new `Dirichlet` with the given shape parameter `alpha` and `size`.
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this? new(&vec![alpha;size]) does the same thing, and probably is not really slower.

Copy link
Member Author

Choose a reason for hiding this comment

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

This came from #15. I guess it doesn't add much.

A specialised implementation for this would be more useful, saving memory and an allocation in the constructor.

@dhardy dhardy merged commit d2146ee into master Sep 12, 2025
14 checks passed
@barakugav
Copy link

is there any release expected in the horizon? I cant use the current const version

@dhardy
Copy link
Member Author

dhardy commented Sep 13, 2025

I'll make a pre-release as soon as #31 is approved. v0.6 final might not be so soon — we may make a new getrandom release first.

@dhardy
Copy link
Member Author

dhardy commented Sep 15, 2025

@barakugav I published the pre-release

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.

3 participants