|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.math.LogFaculty
@ALDMetaInfo(export=ALLOWED) public class LogFaculty
Class to compute the logarithm of the faculty of an integer n. This class stores all values from log(0!) to log(n_max!) to provide fast access for values of n in the range [0,n_max]. If values for n > n_max are requested, the internal array is extended and n_max := n.
Constructor Summary | |
---|---|
LogFaculty(int n_max)
Constructor to precompute log(0!) |
Method Summary | |
---|---|
double |
getLogFaculty(int n)
log(n!) |
double |
getLogFacultyFraction(int n1,
int n2)
log(n1! |
int |
getMaxN()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogFaculty(int n_max)
n_max
- Method Detail |
---|
public double getLogFaculty(int n)
n
-
public double getLogFacultyFraction(int n1, int n2)
n1
- nominator facultyn2
- denominator faculty
public int getMaxN()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |