Class PcgRxsMXs64

    • Constructor Detail

      • PcgRxsMXs64

        public PcgRxsMXs64​(Long seed)
        Creates a new instance using a default increment.
        Parameters:
        seed - Initial state.
        Since:
        1.4
      • PcgRxsMXs64

        public PcgRxsMXs64​(long[] seed)
        Creates a new instance.

        Note: Although the seed size is 128 bits, only the first 64 are effective: in effect, two seeds that only differ by the last 64 bits may produce highly correlated sequences.

        Parameters:
        seed - Initial seed. If the length is larger than 2, only the first 2 elements will be used; if smaller, the remaining elements will be automatically set.

        The 1st element is used to set the LCG state. The 2nd element is used to set the LCG increment; the most significant bit is discarded by left shift and the increment is set to odd.