commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <>
Subject Re: [math] stat package design
Date Wed, 09 Jul 2003 02:38:38 GMT
--- "Mark R. Diggory" <> 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.


Albert Davidson Chou

    Get answers to Mac questions at .

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message