Correlate

Declaration: TVector.Correlate (OtherVec: TVector; ElemShift: integer): double;
The function Correlate calculates and returns the (shifted) dot product (inner product) of the two vectors self and OtherVec. The parameter ElemShift specifies the number of Elements the vector OtherVec is shifted before the dot product is calculated. A value of ElemShift = 0 results in the normal dot product.

Hint: Please note that the two vectors self and OtherVec need not be of equal length. Vector elements which are not available during the calculation are assumed to be zero.