Math question regarding the FIR function - “It is functional (but 2+ times faster) equivalent of following AFL”: - from the function definition.
function FIR_AFL( input, coeff, size )
{
result = 0;
sumcoeff = 0;
for( i = 0; i < Min( size, BarCount ); i++ )
{
sumcoeff += coeff[ i ];
result += coeff[ i ] * Ref( input, - size + i + 1 );
}
return result/sumcoeff;
}
function ALMA_AFL( input, range, Offset, sigma )
{
local m, im, s, Coeff;
m = floor( Offset * (range - 1) );
s = range / sigma;
for( i = 0; i < Min( range, BarCount ); i++ )
{
im = i - m;
Coeff[ i ] = exp( - ( im * im )/ ( 2 * s * s ) );
}
return FIR( input, Coeff, range );
}
If I replace the 2 times faster FIR with FIR_AFL in the ALMA function (it produces a very smooth line but looks into the future) - Question is why does replacing FIR with FIR_AFL cross the threshold of looking into the future?
Thanks kindly