Whoops, forget about skipping the history(), of course it couldn't work. However, by adding a state buffer to the class, the first for() loop can be skipped. For long MAs, this would save some multiplications and only increase memory usage by one item_size.
The reason we don't do that is that floating point numbers will have numerical errors. If you add thousands of floats together, and then subtract them all out, you won't get zero. This error will accumulate over time and become unstable. That is why we start our accumulation over again periodically.
Matt _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio