Documentation
¶
Overview ¶
Package pgen is a package for deterministic generation of random-like numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gen ¶
type Gen int64
A Gen is a deterministic generator of random-like numbers.
func (Gen) Float32 ¶
Float32 generates the random number for index i and converts it to a float32 in the range [0,1).
func (Gen) Float64 ¶
Float64 generates the random number for index i and converts it to a float64 in the range [0,1).
func (Gen) Int32 ¶
Int32 generates the random number for index i. It returns integers in the range [0,2^31-1].
func (Gen) Int64 ¶
Int64 generates the random number for index i. It returns integers in the range [0,2^63-1].
func (Gen) Int64n ¶ added in v0.0.3
Int64n generates the random number for index i using 64 bits. It returns integers in the range [0,n).
func (Gen) Intn ¶
Intn generates the random number for index i. It returns integers in the range [0,n).