splitmix64

package
v0.0.0-...-a8cedd3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package splitmix64 implements the SplitMix64 random number generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicSource

type AtomicSource uint64

An AtomicSource is a concurrency-safe SplitMix64 random number generator.

All methods on an AtomicSource may safely be called concurrently by multiple goroutines.

func (*AtomicSource) Int63

func (s *AtomicSource) Int63() int64

Int63 returns a 63-bit random number.

func (*AtomicSource) Seed

func (s *AtomicSource) Seed(seed int64)

Seed seeds the generator.

func (*AtomicSource) Uint64

func (s *AtomicSource) Uint64() uint64

Uint64Atomic returns a 64-bit random number. It may be safely called by multiple goroutines concurrently.

type Source

type Source uint64

A Source is a SplitMix64 random number generator.

func (*Source) Int63

func (s *Source) Int63() int64

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

func (*Source) Seed

func (s *Source) Seed(seed int64)

Seed uses the provided seed value to initialize the generator to a deterministic state.

func (*Source) Uint64

func (s *Source) Uint64() uint64

Uint64 returns a pseudo-random 64-bit value as a uint64.

Jump to

Keyboard shortcuts

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