testrandom

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const Lfsr28Max uint32 = 0x10000000

The exclusive max value, produced by Lfsr28.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lfsr28

type Lfsr28 uint32

A 28-bit linear-feedback shift register which generates an m-sequence. Use this to produce a pseudo-random sequence of numbers to implement reproducible tests.

The register must be initialized with a value, which is greater to zero and less than Lfsr28Max value.

func DefaultLfsr28

func DefaultLfsr28() *Lfsr28

DefaultLfsr28 creates a new linear-feedback shift register with the initial value 1.

func (*Lfsr28) Next

func (r *Lfsr28) Next() uint32

Next returns the next pseudo-random number.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL