TVec AutoCorrNormal(TVec Vec, Int32 Lags, TVecInt Buffer)
Normal auto-corellation.
Result: stored in self (calling object), returns self for chaining
Remarks:
Calculates the normal auto-correlation of the vector Vec. The result of Length = Lags is stored in the calling vector (V). The Lags parameter must be equal or smaller than the calling vector (V) length. The normal auto-correlation is defined by the following equation:
The Buffer parameter allows the same work memory to be used between consecutive calls to this and other functions. The Buffer object will not be resized, if sufficient memory is present.
Examples
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TVec a,b;
MtxVec.CreateIt(out a, aut b);
try
{
a.SetIt(false, new double[] {1,2,3,4});
b.AutoCorrNormal(a,2);
}
finally
{
MtxVec.FreeIt(ref a, ref b);
}
}
}
See Also: TVec.AutoCorrBiased, TVec.AutoCorrUnBiased