Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float64PRNG ¶
type Float64PRNG struct {
// contains filtered or unexported fields
}
Float64PRNG is a seeded pseudorandom float64 generator using a seeded PseudorandomReader initialized from a provided seed.
func NewFloat64PRNG ¶
func NewFloat64PRNG(seed []byte) *Float64PRNG
NewFloat64PRNG returns a new Float64PRNG with a PseudorandomReader initialized using seed.
func (*Float64PRNG) Next ¶
func (f *Float64PRNG) Next() (float64, error)
Next gets the next float64 from the Float64PRNG.
type PseudorandomReader ¶ added in v1.0.0
type PseudorandomReader struct {
// contains filtered or unexported fields
}
PseudorandomReader is a Reader providing seeded pseudorandom output from an internal stream cipher encrypting 0s.
It is not concurrency-safe.
func NewPseudorandomReader ¶ added in v1.0.0
func NewPseudorandomReader(seed []byte) *PseudorandomReader
NewPseudorandomReader initializes a PseudorandomReader by initializing its internal stream cipher and generating the first buffer.
Click to show internal directories.
Click to hide internal directories.