Class LogBinomialCoefficient

    • Method Detail

      • value

        public static double value​(int n,
                                   int k)
        Computes the logarithm of the binomial coefficient.

        This returns a finite result for any valid n choose k.

        Parameters:
        n - Size of the set.
        k - Size of the subsets to be counted.
        Returns:
        log(n choose k).
        Throws:
        IllegalArgumentException - if n < 0, k < 0 or k > n.