|
static long | bin (final int N, final int K) |
|
WB_Binomial.
- Author
- Frederik Vanhoutte, W:Blut
Calculates binomial coefficients.
wblut.math.WB_Binomial.WB_Binomial |
( |
final int |
N, |
|
|
final int |
K |
|
) |
| |
An instance of WB_Binomial stores a N by K matrix of binomial coefficients.
n! / (n-k)! k!
This is efficient if the same coefficients are need over and over. The precalculated coefficient are retrieved with binPreCalc(). If only a few coefficients are needed, the static function bin() can be more efficient. It can be directly called as WB_Binomial.bin(n,k)
- Parameters
-
static long wblut.math.WB_Binomial.bin |
( |
final int |
N, |
|
|
final int |
K |
|
) |
| |
|
static |
Retrieve arbitrary binomial coefficient.
- Parameters
-
- Returns
- binomial coefficient as long
long wblut.math.WB_Binomial.binPrecalc |
( |
final int |
n, |
|
|
final int |
k |
|
) |
| |
Retrieve the precalculated binomial coefficient from an instance of WB_Binomial.
- Parameters
-
- Returns
- binomial coefficient as long
final long [][] wblut.math.WB_Binomial.binomial |
|
private |
The documentation for this class was generated from the following file: