public class KahanPlusSq extends KahanFunction implements Serializable
Modifier and Type | Method and Description |
---|---|
Data |
execute(Data kObj,
double in)
Square the given term, then add to the existing sum using
the Kahan summation algorithm.
|
Data |
execute(Data kObj,
double sum,
double corr)
Add the given sum and correction factor to the existing
sum in the KahanObject using the Kahan summation algorithm.
|
void |
execute2(KahanObject kObj,
double in)
Add the given term to the existing sum with a function applied
using the Kahan summation algorithm.
|
void |
execute3(KahanObject kObj,
double in,
int count) |
static KahanPlusSq |
getKahanPlusSqFnObject()
Get the KahanPlusSq singleton object.
|
requiresCorrection
public static KahanPlusSq getKahanPlusSqFnObject()
public Data execute(Data kObj, double in)
execute
in class FunctionObject
kObj
- A KahanObject supplied as a Data type containing
the current sum and correction factor for the
Kahan summation algorithm.in
- The current term to be squared and added.public Data execute(Data kObj, double sum, double corr)
execute
in class FunctionObject
kObj
- A KahanObject supplied as a Data type containing
the current sum and correction factor for the
Kahan summation algorithm.sum
- The current sum.corr
- The current correction factor.public void execute2(KahanObject kObj, double in)
KahanFunction
execute2
in class KahanFunction
kObj
- A KahanObject containing the current sum and
correction factor for the Kahan summation
algorithm.in
- The current term to be added.public void execute3(KahanObject kObj, double in, int count)
execute3
in class KahanFunction
Copyright © 2020 The Apache Software Foundation. All rights reserved.