commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <mdigg...@latte.harvard.edu>
Subject Re: [math] stat package design
Date Wed, 09 Jul 2003 04:06:08 GMT
Al Chou wrote:
> --- "Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote:
> 
>>Prior to my changes last night "increment" was actually calculating the
>>entire statistic. "getValue" was only returning the value of a precalculated
>>property. The problem is that the cpu cycles need to be "spent" no matter the
>>approach of full calculation in "increment" or "partial calc" in increment
>>and "partial calc" in getValue. I think addVAlue is going to get called alot
>>more than getValue, so I've optimized to reduce the amount of calculation
>>going on in increment as much as possible. (it would be possible to maintain
>>a boolean state about if "increment" has been called, this way calling
>>getValue repeatedly will not result in repeatedly calculating the same
>>statistical value over and over. I'll look into adding this.
> 
> 
> Sorry to post-and-run, but I'm on a business trip this week.  The above is
> memoization, isn't it?  Sounds like a good idea, especially for values that
> take a lot of operations to compute.
> 
> 
> Al
> 

Yes, I've worked a bit on this for the incremental stuff, but havn't 
commited my changes yet. There's still some work I need to do.

-Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message