commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <>
Subject Re: [math] Proposal for Package restructuring and Class renaming
Date Fri, 07 Nov 2003 22:01:08 GMT
--- "Mark R. Diggory" <> wrote:
> I have several modifications I'm planning to make, but in the spirit of 
> consensus I want to propose them and attempt to get some agreement. So 
> math developer opinions on the subject would be good.
> 1.) o.a.c.math.stat.distributions --> o.a.c.math.distributions
> Gives this package a more "generic" position to hold more than just 
> "stat" distributions.

What other kinds of distributions did you have in mind?  I'm asking out of
complete ignorance.

> 2.) Like in my last emails concerning "Univariate" I would like to, (and 
> have done so in my checkout successfully) Make the following Class changes:
> interface o.a.c.m.stat.StoreUnivariate -->
>             abstract class o.a.c.m.stat.DescriptiveStatistics
> this actually becomes a factory class and uses Discovery to instantiate 
> new instances of the following implementations
> *default implementation*
> o.a.c.m.stat.StoreUnivariateImpl -->
>            o.a.c.m.stat.univariate.StatisticsImpl

Forgive me for not refamiliarizing myself with the code first, but should the
storeless version perhaps be the default implementation instead?  What do we
lose by going that way?  I'm thinking it would be nice to keep memory usage
lower if possible.

> *alternate implementations*
> o.a.c.m.stat.UnivariateImpl -->
>            o.a.c.m.stat.univariate.StorelessStatisticsImpl
> o.a.c.m.stat.ListUnivariateImpl -->
>            o.a.c.m.stat.univariate.ListStatisticsImpl
> o.a.c.m.stat.BeanListUnivariateImpl -->
>            o.a.c.m.stat.univariate.BeanListStatisticsImpl
> The benefit of this is that the Alternate Implementations can all be 
> instantiated from the o.a.c.m.stat.DescriptiveStatistics factories 
> newInstance(...) methods. Thus alternate implementations of 
> DescriptiveStatistics can be written as Service Providers and set in the 
> environment/JVM configuration. We can now write SP's for other tools 
> like Matlab, Mathematica, JLink, C++ libraries, R, Omegahat ... the list 
> goes on and on...
> Someday, I'd like to see this design extended for Bivariate Statistics 
> and Regression Classes. Eventually for Random Number generation as well.

Before we go overboard, can you give a quick example of instantiating one of
the implementations?  Or perhaps, both the default and one alternative
implementation?  Is it:

import org.apache.commons.math.stat.*;


StoreUnivariateImpl defaultImplementation = DescriptiveStatistics.newInstance()
StoreUnivariateImpl storagelessImplementation =
DescriptiveStatistics.newInstance( StorelessStatisticsImpl ) ;


Albert Davidson Chou

    Get answers to Mac questions at .

Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

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

View raw message