Datasourceforcryptocurrency / node_modules /pure-rand /lib /distribution /UnsafeUniformArrayIntDistribution.js
Download node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js from Really-amin/Datasourceforcryptocurrency: direct link, hf CLI and curl.
- Browser
- Download file 856 Bytes
-
https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js
- Command line
-
hf download hf://spaces/Really-amin/Datasourceforcryptocurrency@250b128700538234afd94de5d02f4e054f24823e/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js
-
curl -L -o UnsafeUniformArrayIntDistribution.js https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js
856 Bytes
| ; | |
| exports.__esModule = true; | |
| exports.unsafeUniformArrayIntDistribution = void 0; | |
| var ArrayInt_1 = require("./internals/ArrayInt"); | |
| var UnsafeUniformArrayIntDistributionInternal_1 = require("./internals/UnsafeUniformArrayIntDistributionInternal"); | |
| function unsafeUniformArrayIntDistribution(from, to, rng) { | |
| var rangeSize = (0, ArrayInt_1.trimArrayIntInplace)((0, ArrayInt_1.addOneToPositiveArrayInt)((0, ArrayInt_1.substractArrayIntToNew)(to, from))); | |
| var emptyArrayIntData = rangeSize.data.slice(0); | |
| var g = (0, UnsafeUniformArrayIntDistributionInternal_1.unsafeUniformArrayIntDistributionInternal)(emptyArrayIntData, rangeSize.data, rng); | |
| return (0, ArrayInt_1.trimArrayIntInplace)((0, ArrayInt_1.addArrayIntToNew)({ sign: 1, data: g }, from)); | |
| } | |
| exports.unsafeUniformArrayIntDistribution = unsafeUniformArrayIntDistribution; | |