概率表

时间:2024-03-01 13:18:22
【文件属性】:

文件名称:概率表

文件大小:161KB

文件格式:ZIP

更新时间:2024-03-01 13:18:22

JavaScript

概率表 处理概率查找表的简单方法 import Table = from 'probability-table' ; let inst = new Table ( ) , outcome ; // Percentage and the value to return inst . add ( 50 , 'heads' ) ; inst . add ( 50 , 'tails' ) ; //Accepts a number from 0 - 1 exclusive // "tails" || "heads" outcome = inst . get ( Math . random ( ) ) ; inst . clear ( ) ; //The total probability need not add up to 100% inst . add ( 50 , 'heads' ) ;


【文件预览】:
probability-table-master
----.jshintrc(258B)
----.gitignore(80B)
----.jscsrc(1KB)
----.eslintrc(13KB)
----.jsdoc(460B)
----package.json(874B)
----.npmrc(14B)
----package-lock.json(633KB)
----src()
--------index.js(1KB)
----.gitlab-ci.yml(139B)
----LICENCE(1KB)
----.prettierignore(30B)
----tests()
--------jest.config.js(265B)
--------suites.js()
----.x82-secrets.yml(173B)
----.eslintignore(49B)
----readme.md(600B)
----.babelrc.js(254B)
----.npmignore(109B)
----.gitattributes(34B)
----.editorconfig(150B)
----.prettierrc(46B)

网友评论