0.2.1 • Published 5 years ago

low-discrepancy-sequence v0.2.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

A halton sequence implementation in js.

Classes

haltonSequence

A 2D halton sequence generator.

Kind: global class

new haltonSequence(bases, seed)

Constructor

ParamTypeDefaultDescription
basesArray2,3A Vector representing the bases of the sequence.
seedNumber1The 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

ParamTypeDefaultDescription
baseNumber2The base.
indexNumber1The 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.

ParamTypeDescription
iNumberThe index.
bNumberThe base.

vanDerCorput.getNext() ⇒ Number

Get the next element from the sequence.

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

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago