On Mon, 16 Jun 2003, Mark R. Diggory wrote: > (1) Bean etiquette suggests "getters" are for bean properties, its > usually recommended that this means that they do nothing more than > return the value for a property. This is beneficial in our Univariate > case when calling a getter many times without adding a new value (lets > say you use "getKurtosis" allot in a calculation before adding another > value), then its more logical to have the kurtosis only calculated once > and put the code for calculating it in the addValue method.
These objects are not JavaBeans, but using getXXX naming standards does provide some benefits (say create a Univariate instance and reference it from EL, Velocity, etc...). I don't see any problems violating the standard for bean properties as these are not really "properties". > (2) However, If calling addValue many times (more likely the case) with > only the interest of getting the "getMean" back, its wasted > computational time to calculate all the other Stats (like kurtosis) in > addValue when you just want the results of "getMean" back after each > "addValue". It is important to remember that in some of the stored univariate instances the storage medium is external to the Univariate instance. In those cases, I don't see us being able to consolidate any of our calculations in addValue(). In other words, ListUnivariateImpl is imply attached to an external List - a user can go ahead and add 100 values to that list without ListUnivariateImpl's involvement. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
