new Randomizer(_seedopt)
Mersenne Twister random number generator.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
_seed | Number | <optional> | new Date().getTime() | The seed for the random number generator. If |
- Source
Members
random
Returns a float between 0 and 1.
- Source
random_int
Returns an integer between 0 and MAX_INTEGER.
- Source
seed
Returns the seed of the random number generator.
- Source
Methods
(static) choice(A, n, seed) → {Array}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
A | Matrix | | The input Matrix or Array. | |
n | Number | The number of samples. | |
seed | Number | 1212 | The seed for the random number generator. |
- Source
Returns:
- A random selection form
A
ofn
samples.
- Type:
- Array
choice(A, n) → {Array}
Returns samples from an input Matrix or Array.
Parameters:
Name | Type | Description |
---|---|---|
A | Matrix | | The input Matrix or Array. |
n | Number | The number of samples. |
- Source
Returns:
- A random selection form
A
ofn
samples.
- Type:
- Array