Class RngStateReplay

A non-random random number state, where the stream is replayed from some set of provided numbers. Typically created from replay, in which case generating more draws from the original source will increase the number available in the replayable state.

Hierarchy

Constructors

Methods

  • getState(): any
  • Get the entire internal state of a generator

    Returns any

  • length(): number
  • Number of draws left in the object before we run out of state to replay

    Returns number

  • random(): number
  • Generate a single random number on the interval [0, 1], updating whatever internal state the generator uses.

    Returns number

  • setSeed(seed: any): void
  • Set the seed of the generator; most generators should support this but RngStateBuiltin does not, and a cryptographically secure generator also may not.

    Parameters

    • seed: any

    Returns void

  • setState(state: any): void
  • Replace the entire internal state of a generator

    Parameters

    • state: any

    Returns void

Generated using TypeDoc