public final class LogFactorial extends Object
LogGamma.value(double)
.Modifier and Type | Method and Description |
---|---|
static LogFactorial |
create()
Creates an instance with no precomputed values.
|
double |
value(int n)
Computes \( log_e(n!) \).
|
LogFactorial |
withCache(int cacheSize)
Creates an instance with the specified cache size.
|
public static LogFactorial create()
public LogFactorial withCache(int cacheSize)
cacheSize
- Number of precomputed values of the function.cacheSize
values have been
precomputed.IllegalArgumentException
- if cacheSize < 0
.public double value(int n)
n
- Argument.log(n!)
.IllegalArgumentException
- if n < 0
.Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.