Skip to content
/ dscrtz Public

Generate random value from discrete distribution

License

Notifications You must be signed in to change notification settings

gnlow/dscrtz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dscrtz

Generate random value from discrete distribution

Example (Deno)

import {Discrete} from "https://raw.githubusercontent.com/gnlow/dscrtz/master/mod.ts"
const distribution = new Discrete(["A", 11], ["B", 20], ["C", 15])

console.log(distribution.rand(Math.random()))

About

Generate random value from discrete distribution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published