Class PcgMcgXshRs32

    • Constructor Detail

      • PcgMcgXshRs32

        public PcgMcgXshRs32​(Long seed)
        Creates a new instance.
        Parameters:
        seed - Initial seed.
    • Method Detail

      • transform

        protected int transform​(long x)
        Transform the 64-bit state of the generator to a 32-bit output. The transformation function shall vary with respect to different generators.
        Parameters:
        x - State.
        Returns:
        the output
      • next

        public int next()
        Returns:
        the next random value.
      • getStateInternal

        protected byte[] getStateInternal()
        Creates a snapshot of the RNG state.
        Overrides:
        getStateInternal in class IntProvider
        Returns:
        the internal state.