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

public Class Covar

extends Fixed2ArgFunction
implements FreeRefFunction
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.FreeRefFunction
Imports
org.apache.commons.math3.stat.correlation.Covariance, org.apache.poi.ss.formula.OperationEvaluationContext, org.apache.poi.ss.formula.eval.ErrorEval, .EvaluationException, .NumberEval, .ValueEval, java.util.List

Implementation for Excel COVAR() and COVARIANCE.P() functions.

Syntax:
COVAR (array1, array2)

See Also
COVAR, COVARIANCE.P

Field Summary

Modifier and TypeField and Description
public static final Covar
public static final Covar
private final boolean

Constructor Summary

AccessConstructor and Description
private
Covar(boolean sampleBased)

Method Summary

Modifier and TypeMethod and Description
public ValueEval
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.

Inherited from org.apache.poi.ss.formula.functions.Fixed2ArgFunction:
evaluate

Field Detail

instancePback to summary
public static final Covar instanceP
instanceSback to summary
public static final Covar instanceS
sampleBasedback to summary
private final boolean sampleBased

Constructor Detail

Covarback to summary
private Covar(boolean sampleBased)

Method Detail

evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1)

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

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

see Function#evaluate(ValueEval[], int, int)

Annotations
@Override
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