zipfian

0.2.0 • Public • Published

zipfian

Zipf Distribution Generation for Node.js

zipf distribution

Usage

To generate a zipf generator, create an instance of ZipfGenerator, and then get your numbers!

var zipfGenerator = require('zipfian').getGenerator(1000);
 
console.log(zipfGenerator.next());

If you want more control over the generator parameters, you can create the generator yourself.

 
var Generator = require('zipfian').ZipfGenerator;
 
var zipfGenerator = new Generator(min, max, zipfConstant);

Bugs + Contributing

Please submit bugs or feature requests in github issues. In particular, this implementation is missing the ability to resize the generator found in previous implementation. Contributions are welcome!

Todo

  • Resizing a generator
  • Scrambled generator

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    6
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i zipfian

Weekly Downloads

6

Version

0.2.0

License

Apache-2.0

Last publish

Collaborators

  • willscott