Package fj

Class LcgRng


  • public class LcgRng
    extends Rng
    https://en.wikipedia.org/wiki/Linear_congruential_generator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Long seed  
    • Constructor Summary

      Constructors 
      Constructor Description
      LcgRng()  
      LcgRng​(long s)  
    • Field Detail

      • seed

        private final java.lang.Long seed
    • Constructor Detail

      • LcgRng

        public LcgRng()
      • LcgRng

        public LcgRng​(long s)
    • Method Detail

      • getSeed

        public final long getSeed()
      • nextInt

        public final P2<Rng,​java.lang.Integer> nextInt()
        Specified by:
        nextInt in class Rng
      • nextLong

        public final P2<Rng,​java.lang.Long> nextLong()
        Specified by:
        nextLong in class Rng
      • nextLong

        static P2<java.lang.Long,​java.lang.Long> nextLong​(long seed)
        Parameters:
        seed -
        Returns:
        Product of Seed and value