The important aspect of moving averages is to minimimize the complexty of the N calculations. Calculate the sum, once, then add the new value and subtract the old value. Divide by N to obtain the average.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: calculate average from range of hash values (optimize)
by TomDLux
in thread calculate average from range of hash values (optimize)
by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |