Help us shape the future of Go! Take the 2026 Go Developer Survey

pcg

package module
v0.0.0-...-2e7a9cf Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 1 Imported by: 0

README

PCG

Golang implementation of some PCG pseudo random number generators from O'Neil. Based on the basic C implementation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Seed64

func Seed64(state uint64)

func Seed128

func Seed128(stateHigh, stateLow uint64)

func Uint32

func Uint32() uint32

func Uint64

func Uint64() uint64

func Uint128

func Uint128() (uint64, uint64)

Types

type Pcg64

type Pcg64 struct {
	// contains filtered or unexported fields
}

PCG XSH RS 64 state / 32 output

func NewDefaultPcg64

func NewDefaultPcg64() *Pcg64

func NewPcg64

func NewPcg64(mul, inc, state uint64) *Pcg64

func (*Pcg64) Copy

func (p *Pcg64) Copy() *Pcg64

func (*Pcg64) Seed

func (p *Pcg64) Seed(state uint64)

----- Default lcg, oneseq, XSH RS

func (*Pcg64) Uint32

func (p *Pcg64) Uint32() uint32

type Pcg128

type Pcg128 struct {
	// contains filtered or unexported fields
}

128 state

func NewDefaultPcg128

func NewDefaultPcg128() *Pcg128

func NewPcg128

func NewPcg128(mulHigh, mulLow, incHigh, incLow, stateHigh, stateLow uint64) *Pcg128

func (*Pcg128) Copy

func (p *Pcg128) Copy() *Pcg128

func (*Pcg128) Seed

func (p *Pcg128) Seed(stateHigh, stateLow uint64)

----- Default lcg, oneseq, XSL RR

func (*Pcg128) Uint64

func (p *Pcg128) Uint64() uint64

func (*Pcg128) Uint128

func (p *Pcg128) Uint128() (uint64, uint64)

Jump to

Keyboard shortcuts

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