Top Fields Constructors Methods
org.apache.poi.ss.formula.functions

public Class Poisson

extends Object
implements FreeRefFunction
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.FreeRefFunction
Imports
org.apache.commons.math3.distribution.PoissonDistribution, org.apache.poi.ss.formula.OperationEvaluationContext, org.apache.poi.ss.formula.eval.BoolEval, .ErrorEval, .EvaluationException, .NumberEval, .ValueEval

Field Summary

Modifier and TypeField and Description
private static final double
public static final Poisson

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
checkArgument(double aDouble)

public ValueEval
evaluate(ValueEval[]
the pre-evaluated arguments for this function. args is never null, nor are any of its elements.
args
,
OperationEvaluationContext
primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
ec
)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

public static ValueEval
evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex)

private static boolean

Returns:

If a default value should be returned.
isDefaultResult
(double
The number.
x
,
double
The mean.
mean
)

This checks is x = 0 and the mean = 0.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_RETURN_RESULTback to summary
private static final double DEFAULT_RETURN_RESULT
instanceback to summary
public static final Poisson instance

Constructor Detail

Poissonback to summary
public Poisson()

Method Detail

checkArgumentback to summary
private static void checkArgument(double aDouble) throws EvaluationException
evaluateback to summary
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)

Implements org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

Parameters
args:ValueEval[]

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

the pre-evaluated arguments for this function. args is never null, nor are any of its elements.

ec:OperationEvaluationContext

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.

Returns:ValueEval

Doc from org.apache.poi.ss.formula.functions.FreeRefFunction.evaluate.

never null. Possibly an instance of ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).

Annotations
@Override
evaluateback to summary
public static ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex)
isDefaultResultback to summary
private static boolean isDefaultResult(double x, double mean)

This checks is x = 0 and the mean = 0. Excel currently returns the value 1 where as the maths common implementation will error.

Parameters
x:double

The number.

mean:double

The mean.

Returns:boolean

If a default value should be returned.