public class Binomial extends PostfixMathCommand
For efficiency the binomial coefficients are stored in a static array.
Constructor and Description |
---|
Binomial() |
Modifier and Type | Method and Description |
---|---|
static int |
binom(int n,
int i)
Returns the binomial coefficients.
|
void |
run(Stack s)
Throws an exception because this method should never be called under
normal circumstances.
|
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
public void run(Stack s) throws ParseException
PostfixMathCommand
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
public static int binom(int n, int i) throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- if n<0, i<0 or i>nJas4pp 1.5 © Java Analysis Studio for Particle Physics