Random Number Generation #8084
Unanswered
GregoryTravis
asked this question in
Work In Progress - Libraries
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Random
contains a default globalRandom_Generator
instance as well as methods for constructing new instances.A
Random_Generator
is a single instance of a random number generator, with methods for obtaining different kinds of random values. These methods also exist onRandom
, implicitly using the default instance ofRandom_Generator
.For each method returning a single value, e.g.
int
, there is another method,ints
, taking a count and returning aVector
of values. These exist on bothRandom
andRandom_Generator
.(Alternately, the single-value methods could all take a
count
parameter.)All basic methods (
int
,float
) are implemented usingjava.util.Random
.This subsumes all
Faker
functionality.Future work / things to think about
API
Beta Was this translation helpful? Give feedback.
All reactions