Skip to content

Distributions: Uniform, Uniform01, Open01, etc. #81

Closed
@dhardy

Description

@dhardy

Update: we will likely use these distributions:

  • Uniform for the default distribution, replacing Rand (including ints, floats with range [0, 1), etc.)
  • extra FP distributions per this strategy

Original post follows.


I'm looking at bringing over some of the changes to distributions code to upstream, in particular replacing Sample and IndependentSample with Distribution, but the change-set touches on a few other things (adjustments to things like Exp1 are needed to support dynamic dispatch (Rng+?Sized) in Distribution::sample, since Rand doesn't support this and changing that would break all Rand implementations everywhere).

So, question: is everyone happy with the distribution names we converged on in this branch, that is

  • Uniform for integers,
  • Uniform01 and Open01 etc. for floats,
  • and Default for "a sensible distribution for any type"?
    This is of course redundant; we could drop Uniform and Uniform01 in favour of using Default directly. Possibly there is a better name than Default (but please not Rand)!

Wacky ideas:

  • UniformFull or FullRange
  • Uniform01HalfOpen01

Of course we don't need any changes. Just asking since it didn't always appear people were happy with these names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions