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
 
 public class KahanPlusSq extends KahanFunction Runtime function to perform the summation of squared values using the Kahan summation algorithm.- See Also:
- Serialized Form
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Dataexecute(Data kObj, double in)Square the given term, then add to the existing sum using the Kahan summation algorithm.Dataexecute(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.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 KahanPlusSqgetKahanPlusSqFnObject()Get the KahanPlusSq singleton object.- 
Methods inherited from class org.apache.sysds.runtime.functionobjects.KahanFunctionrequiresCorrection
 
- 
 
- 
- 
- 
Method Detail- 
getKahanPlusSqFnObjectpublic static KahanPlusSq getKahanPlusSqFnObject() Get the KahanPlusSq singleton object.- Returns:
- KahanPlusSq singleton object
 
 - 
executepublic Data execute(Data kObj, double in) Square the given term, then add to the existing sum using the Kahan summation algorithm.- Overrides:
- executein class- FunctionObject
- 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.
 
 - 
executepublic 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.- Overrides:
- executein class- FunctionObject
- 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.
 
 - 
execute2public void execute2(KahanObject kObj, double in) Description copied from class:KahanFunctionAdd the given term to the existing sum with a function applied using the Kahan summation algorithm.- Specified by:
- execute2in class- KahanFunction
- Parameters:
- kObj- A KahanObject containing the current sum and correction factor for the Kahan summation algorithm.
- in- The current term to be added.
 
 - 
execute3public void execute3(KahanObject kObj, double in, int count) - Specified by:
- execute3in class- KahanFunction
 
 
- 
 
-