Class TSampler

    • Field Detail

      • HUGE_DF

        private static final double HUGE_DF
        Threshold for huge degrees of freedom. Above this value the CDF of the t distribution matches the normal distribution. Value is 2/eps (where eps is the machine epsilon) or approximately 9.0e15.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TSampler

        TSampler​(UniformRandomProvider rng)
        Parameters:
        rng - Generator of uniformly distributed random numbers.
    • Method Detail

      • nextLong

        long nextLong()
        Generates a long value. Used by algorithm implementations without exposing access to the RNG.
        Returns:
        the next random value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • of

        public static TSampler of​(UniformRandomProvider rng,
                                  double degreesOfFreedom)
        Create a new t distribution sampler.
        Parameters:
        rng - Generator of uniformly distributed random numbers.
        degreesOfFreedom - Degrees of freedom.
        Returns:
        the sampler
        Throws:
        java.lang.IllegalArgumentException - if degreesOfFreedom <= 0