low-discrepancy-sequence

0.2.1 • Public • Published

A halton sequence implementation in js.

Classes

haltonSequence

A 2D halton sequence generator.

vanDerCorput

A Van der Corput sequence generator.

haltonSequence

A 2D halton sequence generator.

Kind: global class

new haltonSequence([bases], [seed])

Constructor

Param Type Default Description
[bases] Array [2,3] A Vector representing the bases of the sequence.
[seed] Number 1 The seed to start the sequence index with.

haltonSequence.getNext() ⇒ Object

Get the next 2d element from the halton sequence.

Kind: instance method of haltonSequence
Returns: Object - The element in form {x,y}.

vanDerCorput

A Van der Corput sequence generator.

Kind: global class

new vanDerCorput([base], [index])

Constructor

Param Type Default Description
[base] Number 2 The base.
[index] Number 1 The index to start the sequence with.

vanDerCorput.compute(i, b) ⇒ Number

Compute the given result at an index and base.

Kind: instance method of vanDerCorput
Returns: Number - The computed value of the element at the index and base.

Param Type Description
i Number The index.
b Number The base.

vanDerCorput.getNext() ⇒ Number

Get the next element from the sequence.

Kind: instance method of vanDerCorput
Returns: Number - The next element.

Readme

Keywords

none

Package Sidebar

Install

npm i low-discrepancy-sequence

Weekly Downloads

1

Version

0.2.1

License

MIT

Unpacked Size

8.29 kB

Total Files

9

Last publish

Collaborators

  • vantreeseba