Multi-dimensional distributions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Start by reviewing the existing Distribution trait and the discussions in #14 and rust-random/rand#1478. Resolve whether multidimensional distributions belong in a new crate or rand_distr::multi, and whether they need a shared trait or distribution-specific methods. Done means the API and crate placement questions have a decided, implementable direction.
Written by the indexing model from the issue text.
Description
#14 argues the importance of a variable-length input Dirichlet distribution. rust-random/rand#1478 proposes a Multinomial distribution.
It is also questionable whether the existing Distribution trait is appropriate for these; it may be preferable to use a distinct trait like:
pub trait MultiDistribution<F> {
fn sample<R: Rng + ?Sized>(&mut self, rng: &mut R, output: &mut [F]);
}
Although:
- The above does not support error checking of the length of
output, aside from panic. This may be the most appropriate option anyway, though I would expect at minimum that implementations do assert the length ofoutputis exactly as expected. - There is probably no reason to add this trait over simply adding
pub fn samplemethods to the distribution types.
Questions:
- Should we start a new
rand_multicrate? Or mayberand_distr::multimodule? - Should we add a new
MultiDistributiontrait? Or simply use methods on the distributions without a trait?
- Dominant language
- Rust
- Stars
- 26
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-random/rand_distr
-
rust-random/rand_distr#59 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
rust-random/rand_distr#35 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rust-random/rand_distr#45 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rust-random/rand_distr#7 · 15 comments · 2 reactions ·
All issues in rust-random/rand_distr
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100