JCL Help:SumPairProductFloatArray

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the sum of the product of the elements.


Pascal

 function SumPairProductFloatArray(const X: TDynFloatArray; const Y: TDynFloatArray): Float;


Parameters

Parameters Description
const X: TDynFloatArray The first array.
const Y: TDynFloatArray The second array.


Return Value

The sum of the pairwise product of the elements or 0 if both arrays are empty.


Description

SumPairProductFloatArray returns the sum of the pairwise product of the elements of the two arrays. That is, it calculates: X[0]*Y[0] + X[1]*Y[1] + .. + X[N-1]*Y[N-1]. Note that N in the above formula is the highest common element of X and Y. Thus you can supply arrays with a different dimension in which case the function will only sum the product of the elements common to both arrays. For example, if X has a length 10 and Y has a length 20 then the summation will run from 0 to 9 only.


About

Unit

JclStatistics


Donator

ESB Consultancy


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page