rng

package
v0.0.0-...-fd774ef Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogNormalRNG

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

LogNormalRNG generates Log Normal random numbers

func NewLogNormalRNG

func NewLogNormalRNG(mean float64, stdev float64) *LogNormalRNG

func (*LogNormalRNG) Rand

func (r *LogNormalRNG) Rand() float64

type PoissonRNG

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

PoissonRNG generates Poisson distributed numbers using Knuth's algorithm

func NewPoissonRNG

func NewPoissonRNG(lambda float64) *PoissonRNG

func (*PoissonRNG) Rand

func (r *PoissonRNG) Rand() float64

type RNG

type RNG interface {
	Rand() float64
}

RNG is a random number generator

Jump to

Keyboard shortcuts

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