|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.mrupp.isoak1.Factorial
public class Factorial
Precomputed factorial function. Returns the factorial n*(n-1)*...*1 of the input argument n. Implemented via tables for maximum speed. Runs in constant time.
Constructor Summary | |
---|---|
Factorial()
Provides precomputed results for the factorial function. |
Method Summary | |
---|---|
static int |
factorial(int n)
Returns the factorial for arguments 0,1,...,12. |
static long |
factorial(long n)
Returns the factorial for arguments 0,1,...,20. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Factorial()
Method Detail |
---|
public static int factorial(int n)
public static long factorial(long n)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |