public final class BinomialCoefficientDouble extends Object
double
.
It is "n choose k
", the number of k
-element subsets that
can be selected from an n
-element set.Modifier and Type | Method and Description |
---|---|
static double |
value(int n,
int k)
Computes the binomial coefficient.
|
public static double value(int n, int k)
n
for which all coefficients can
fit into a long
is 66.n
- Size of the set.k
- Size of the subsets to be counted.n choose k
.IllegalArgumentException
- if n < 0
.IllegalArgumentException
- if k > n
.Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.