Interface JumpableUniformRandomProvider

    • Method Detail

      • jump

        UniformRandomProvider jump()
        Creates a copy of the UniformRandomProvider and then advances the state of the current instance. The copy is returned.

        The current state will be advanced in a single operation by the equivalent of a number of sequential calls to a method that updates the state of the provider. The size of the jump is implementation dependent.

        Repeat invocations of this method will create a series of generators that are uniformly spaced at intervals of the output sequence. Each generator provides non-overlapping output for the length of the jump for use in parallel computations.

        Returns:
        A copy of the current state.
      • jumps

        default Stream<UniformRandomProviderjumps​(long streamSize)
        Returns a stream producing the given streamSize number of new random generators, each of which implements the UniformRandomProvider interface.
        Parameters:
        streamSize - Number of objects to generate.
        Returns:
        a stream of random generators; the stream is limited to the given streamSize.
        Throws:
        IllegalArgumentException - if streamSize is negative.
        Since:
        1.5