xoroshiro512starstar

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package xoroshiro512starstar (XOR/rotate/shift/rotate) all-purpose generator with internal 512 bits state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XoroShiro512StarStar

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

XoroShiro512StarStar holds the state required by XoroShiro512StarStar generator

func NewSource

func NewSource(seed int64) *XoroShiro512StarStar

NewSource return a new XoroShiro512StarStar random number generator

func (*XoroShiro512StarStar) Int63

func (x *XoroShiro512StarStar) Int63() int64

Int63 returns a non-negative pseudo-random 63-bit integer as an int64.

func (*XoroShiro512StarStar) Jump

func (x *XoroShiro512StarStar) Jump()

Jump it is equivalent to 2^256 calls to Uint64().

func (*XoroShiro512StarStar) Seed

func (x *XoroShiro512StarStar) Seed(seed int64)

Seed use the provvided seed value to init XoroShiro512StarStar internal state.

func (*XoroShiro512StarStar) Uint64

func (x *XoroShiro512StarStar) Uint64() uint64

Uint64 returns the next pseudo random number generated, before start you must provvide seed.

Jump to

Keyboard shortcuts

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