Class KahanPlusSq
java.lang.Object
org.apache.sysds.runtime.functionobjects.FunctionObject
org.apache.sysds.runtime.functionobjects.ValueFunction
org.apache.sysds.runtime.functionobjects.KahanFunction
org.apache.sysds.runtime.functionobjects.KahanPlusSq
- All Implemented Interfaces:
Serializable
Runtime function to perform the summation of squared values using
the Kahan summation algorithm.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSquare the given term, then add to the existing sum using the Kahan summation algorithm.Add the given sum and correction factor to the existing sum in the KahanObject using the Kahan summation algorithm.voidexecute2(KahanObject kObj, double in) Add the given term to the existing sum with a function applied using the Kahan summation algorithm.voidexecute3(KahanObject kObj, double in, int count) static KahanPlusSqGet the KahanPlusSq singleton object.Methods inherited from class org.apache.sysds.runtime.functionobjects.KahanFunction
requiresCorrectionMethods inherited from class org.apache.sysds.runtime.functionobjects.ValueFunction
isBinary, toString
-
Method Details
-
getKahanPlusSqFnObject
Get the KahanPlusSq singleton object.- Returns:
- KahanPlusSq singleton object
-
execute
Square the given term, then add to the existing sum using the Kahan summation algorithm.- Overrides:
executein classFunctionObject- Parameters:
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.
-
execute
Add the given sum and correction factor to the existing sum in the KahanObject using the Kahan summation algorithm.- Overrides:
executein classFunctionObject- Parameters:
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.
-
execute2
Description copied from class:KahanFunctionAdd the given term to the existing sum with a function applied using the Kahan summation algorithm.- Specified by:
execute2in classKahanFunction- Parameters:
kObj- A KahanObject containing the current sum and correction factor for the Kahan summation algorithm.in- The current term to be added.
-
execute3
- Specified by:
execute3in classKahanFunction
-