uniform

package
Version: v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uniform

type Uniform struct {
	Min float64
	Max float64
	// contains filtered or unexported fields
}

Uniform is a source of uniformly distributed random numbers. See: https://en.wikipedia.org/wiki/Continuous_uniform_distribution.

func New

func New(min, max float64, generator *rand.LockedRand) *Uniform

New returns a new Normal, initialized with the given min and max parameters.

func (Uniform) Next

func (u Uniform) Next() float64

Next returns a random sample drawn from the distribution.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL