UNPKG

@thewtex/vtk.js-esm

Version:

Visualization Toolkit for the Web

71 lines (52 loc) 2.29 kB
import { a as alea } from './lib/alea.js'; import { x as xor128 } from './lib/xor128.js'; import { x as xorwow } from './lib/xorwow.js'; import { x as xorshift7 } from './lib/xorshift7.js'; import { x as xor4096 } from './lib/xor4096.js'; import { t as tychei } from './lib/tychei.js'; import { s as seedrandom$1 } from './seedrandom.js'; // A library of seedable RNGs implemented in Javascript. // // Usage: // // var seedrandom = require('seedrandom'); // var random = seedrandom(1); // or any seed. // var x = random(); // 0 <= x < 1. Every bit is random. // var x = random.quick(); // 0 <= x < 1. 32 bits of randomness. // alea, a 53-bit multiply-with-carry generator by Johannes Baagøe. // Period: ~2^116 // Reported to pass all BigCrush tests. // xor128, a pure xor-shift generator by George Marsaglia. // Period: 2^128-1. // Reported to fail: MatrixRank and LinearComp. // xorwow, George Marsaglia's 160-bit xor-shift combined plus weyl. // Period: 2^192-2^32 // Reported to fail: CollisionOver, SimpPoker, and LinearComp. // xorshift7, by François Panneton and Pierre L'ecuyer, takes // a different approach: it adds robustness by allowing more shifts // than Marsaglia's original three. It is a 7-shift generator // with 256 bits, that passes BigCrush with no systmatic failures. // Period 2^256-1. // No systematic BigCrush failures reported. // xor4096, by Richard Brent, is a 4096-bit xor-shift with a // very long period that also adds a Weyl generator. It also passes // BigCrush with no systematic failures. Its long period may // be useful if you have many generators and need to avoid // collisions. // Period: 2^4128-2^32. // No systematic BigCrush failures reported. // Tyche-i, by Samuel Neves and Filipe Araujo, is a bit-shifting random // number generator derived from ChaCha, a modern stream cipher. // https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf // Period: ~2^127 // No systematic BigCrush failures reported. // The original ARC4-based prng included in this library. // Period: ~2^1600 seedrandom$1.alea = alea; seedrandom$1.xor128 = xor128; seedrandom$1.xorwow = xorwow; seedrandom$1.xorshift7 = xorshift7; seedrandom$1.xor4096 = xor4096; seedrandom$1.tychei = tychei; var seedrandom = seedrandom$1; export { seedrandom as s };