Constructor
new Machine(settings)
Create a Machine.
Parameters:
Name | Type | Description |
---|---|---|
settings |
Object | Run-time configuration. |
- Source:
Methods
(async) compute(input) → {Machine}
Computes the next "step" for our current Vector. Analagous to `sum`.
The top item on the stack is always the memory held at current position,
so counts should always begin with 0.
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Value to pass as input. |
- Source:
Returns:
Instance of the resulting machine.
- Type
- Machine
sip(nopt) → {Number}
Get `n` bits of deterministic random data.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
Number |
<optional> |
128 | Number of bits to retrieve. |
- Source:
Returns:
Random bits from Generator.
- Type
- Number
slurp(nopt) → {Number}
Get `n` bytes of deterministic random data.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
Number |
<optional> |
32 | Number of bytes to retrieve. |
- Source:
Returns:
Random bytes from Generator.
- Type
- Number