Options
All
  • Public
  • Public/Protected
  • All
Menu

@thi.ng/lowdisc

lowdisc

npm versionnpm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

n-dimensional low-discrepancy sequence generators/iterators.

This package provides the following n-dimensional low-discrepancy sequence generators, partially based on the article The Unreasonable Effectiveness of Quasirandom Sequences by Martin Roberts.

Halton

Configurable basis for each dimension:

haltonND([2,3])

2D Halton(2,3) sequence

Kronecker

Configurable basis for each dimension:

kroneckerND([1 / 2 ** 0.5, 1 / 5 ** 0.5])

2D Kronecker sequence (Golden ratio)

R2 recurrence

Based on Kronecker with each dimension's base automatically derived from the Plastic number:

plasticND(2)

2D R2 recurrence sequence

Status

BETA - possibly breaking changes forthcoming

Search or submit any issues for this package

Installation

yarn add @thi.ng/lowdisc
// ES module
<script type="module" src="https://unpkg.com/@thi.ng/lowdisc?module" crossorigin></script>

// UMD
<script src="https://unpkg.com/@thi.ng/lowdisc/lib/index.umd.js" crossorigin></script>

Package sizes (gzipped, pre-treeshake): ESM: 499 bytes / CJS: 572 bytes / UMD: 653 bytes

Dependencies

API

Generated API docs

TODO

Authors

Karsten Schmidt

If this project contributes to an academic publication, please cite it as:

@misc{thing-lowdisc,
  title = "@thi.ng/lowdisc",
  author = "Karsten Schmidt",
  note = "https://thi.ng/lowdisc",
  year = 2020
}

License

© 2020 - 2021 Karsten Schmidt // Apache Software License 2.0

Generated using TypeDoc