Documentation ¶
Index ¶
- func CryptoRand() uint64
- func FailureCountTest(x rng, rounds int, seed uint64, h string) string
- func MultiTest(x rng, rounds, numbers int, tau float64, seed uint64, h string) string
- func PoissonLimits(prob, lambda float64) (obslo, obshi int, probLo, probHi float64)
- func ProbPoisson(x, lambda float64) float64
- func ProbTriangular(f1, f2 float64) float64
- func PvalChi2(x, df float64) float64
- func PvalNormal(z float64) float64
- func PvalPoisson(obs, lambda float64) float64
- func SimTests(x u64, tests int, seed uint64, tau float64, rank int, rounds int, ...) string
- func SimTestsC(x u64, tests int, seed uint64, tau float64, rank int, rounds int, ...) string
- func SingleTest(x rng, numbers int, seed uint64, h string) string
- func Splitmix64(state *uint64) uint64
- type Failu
- type LCG
- type MCG
- type MCG64
- type Rand
- type Testu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailureCountTest ¶
FailureCountTest --
func PoissonLimits ¶
PoissonLimits returns an interval of observed events [obsLo, obsHi] where P(x <= obslo) = probLo P(x >= obshi) = probHi and probLo + probHi ~ prob probLo ~ probHi probLo >= prob/2 probHi <= prob/2
func ProbPoisson ¶
ProbPoisson returns probability to get x events when lambda events are expected.
func ProbTriangular ¶
ProbTriangular returns probability P(f1 <= x <= f2), where x = x1 - x2 and x1, x2 ~ Norm(0, 1). Difference of two uniform floats in [0, 1] should follow this distribution. https://en.wikipedia.org/wiki/Triangular_distribution
func PvalNormal ¶
PvalNormal returns two sided probability for z ~ Norm(0, 1)
func SimTests ¶
func SimTests(x u64, tests int, seed uint64, tau float64, rank int, rounds int, extrapvals []float64) string
SimTests --
func SimTestsC ¶
func SimTestsC(x u64, tests int, seed uint64, tau float64, rank int, rounds int, extrapvals []float64) string
SimTestsC runs simulations concurrently. Speed gain 0 - 60%.
func Splitmix64 ¶
Splitmix64 --------------------------------------
Types ¶
type Failu ¶
type Failu struct { Rounds int Numbers int PvalFail float64 Seed uint64 CryptoSeed bool Tau float64 Pstop float64 Reseed bool // contains filtered or unexported fields }
Failu --
type LCG ¶
type LCG struct {
// contains filtered or unexported fields
}
LCG ----------------------------------------------
func (*LCG) Uint64 ¶
Uint64 -- https://nuclear.llnl.gov/CNP/rng/rngman/node4.html
type MCG ¶
type MCG struct {
// contains filtered or unexported fields
}
MCG implement 128-bit x 128-bit MCG generator.