sfmt

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: BSD-3-Clause Imports: 4 Imported by: 1

README

Gosl. rnd/sfmt. Light wrapper to the SFMT library

SFMT is the SIMD-oriented Fast Mersenne Twister developed by Mutsuo Saito and Makoto Matsumoto at the Hiroshima University.

Check out the SFMT original license file.

NOTE: This sub-subpackage is supposed to be used internally only.

Documentation

Overview

Package sfmt wraps the SFMT SIMD-oriented Fast Mersenne Twister

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(seed int)

Init initializes random numbers generator

Input:
 seed -- seed value; use seed <= 0 to use current time

func PrintIDString added in v1.0.1

func PrintIDString()

PrintIDString prints SFMT id string

func Rand

func Rand(low, high int) int

Rand generates pseudo random integer between low and high

Input:
 low  -- lower limit
 high -- upper limit
Output:
 random integer

func Shuffle

func Shuffle(values []int)

Shuffle shuffles slice of integers

Types

This section is empty.

Jump to

Keyboard shortcuts

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