commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject [math] increment() behavior for stats constructed using external moments
Date Mon, 07 Jun 2004 13:05:34 GMT
Currently, if you construct a StorelessUnivariateStatistic using an 
external moment, calls to increment() (silently) do nothing.  If we are 
going to disallow increment() for these stats, it would probably be better 
to throw IllegalStateException or some other exception to indicate that 
the operation is invalid.

It looks to me; however, like we could actually allow the increment to 
work in this case, delegating to the moment.  What am I missing here?

One more small change that I would like to make is to eliminate the 
protected "helper" stats used in evaluate() (e.g. the Sum instance used by 
the Mean), making these local to the evaluate methods.  This is because a) 
there is no need for them to be constructed for each instance and b) 
making them instance variables may give the (false) impression that their 
state is related to the state of the enclosing statistic.


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

View raw message