xoroshiro256plus

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 xoroshiro256plus (XOR/rotate/shift/rotate) with 256 bits internal state, fast generator for floating-point numbers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XoroShiro256Plus

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

XoroShiro256Plus holds the state required by XoroShiro256Plus generator

func NewSource

func NewSource(seed int64) *XoroShiro256Plus

NewSource return a new XoroShiro256Plus random number generator

func (*XoroShiro256Plus) Int63

func (x *XoroShiro256Plus) Int63() int64

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

func (*XoroShiro256Plus) Jump

func (x *XoroShiro256Plus) Jump()

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

func (*XoroShiro256Plus) Seed

func (x *XoroShiro256Plus) Seed(seed int64)

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

func (*XoroShiro256Plus) Uint64

func (x *XoroShiro256Plus) 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