Re: [PATCH v3] Add generic exponentially weighted moving average (EWMA) function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bruno Randolf
Date: Thursday, October 21, 2010 - 6:25 pm

On Fri October 22 2010 10:11:38 KOSAKI Motohiro wrote:

You know more about this than me. I have no specific reason to use unsigned 
int. I'll change it to unsigned long, if that's better.


Hmm, I guess that depends on the way you want to use it. In my case, most of 
the times when I add a value to the average, I don't need to get the value. 
I'd call ewma_add() many more times than ewma_get(). Having the functions 
defined like this gives us the flexibility to choose and IMHO  
ewma_get(ewma_add(&ewma, val)) isn't so bad?

bruno
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH v3] Add generic exponentially weighted moving a ..., Bruno Randolf, (Thu Oct 21, 6:25 pm)