1.) insertValue is abolished and its contents are now in addValue
2.) UnivariateImpl now extends AbstractStoredUnivariate to deligate to
those methods directly for calculating statistics when storage is active, all methods
deligate to AbstractStoreUniv when the DoubleArray is no longer null. This also means
that a majority of the StoreUnivariate interface is now implemented in Univariate to provide
deligates when storage is active, and to throw runtime exceptions when its not (this at least until
we establish rolling implementations for those methods). We should consider consolidating the
StoreUnivariate interface into the Univariate interface
3.) Calculations in addValue have been reorganized, only calculations for
the storageless solution are now present in this class. otherwise the value is
added/Rolling to the Double array when appropriate.
I'm satisfied that it passes all Unit tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140910 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: HotFusionMan@Yahoo.com
I added this, but there are changes I'd like to make in the near future. Only the "running" aspects of the variance calc should be in the insertValue function, all other calculation should be in the getVariance function.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140908 13f79535-47bb-0310-9956-ffa450edef68
100% test path coverage.
* Used distribution framework TDistribution to implement
getSlopeConfidenceInterval and getSignificance methods.
PR: Issue #20657
Obtained from: Bugzilla
Submitted by: Phil Steitz
Reviewed by: Tim O'Brien
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140900 13f79535-47bb-0310-9956-ffa450edef68
Gamma.java. Gamma.java explicitly stated that it was "based on" an
implementation from Numerical Recipes in C. Please see
http://www.nr.com/infotop.html - these implementations (and derivatives
of these works) are covered under restrictive licensing terms. This
code will be removed from the repository until these issues can be
addressed.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140875 13f79535-47bb-0310-9956-ffa450edef68
included in javadoc recently, plus a few more generic references.
* update the task list based on accomplishments and discussion
PR: Issue 20357
Obtained from: Bugzilla
Submitted by: Phil Steitz
Reviewed by: Tim O'Brien
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140872 13f79535-47bb-0310-9956-ffa450edef68
List of JavaBeans. This implementation extends the ListUnivariateImpl, and uses the
PropertyUtils classes from commons-beanutils. With this implementation, the following
is possible:
List persons = new ArrayList();
// populate array with 100 persons
Univariate ageU = new BeanListUnivariateImpl( persons, "age" );
Univariate incomeU = new BeanListUnivariateImpl( persons, "jobInfo.income" );
System.out.println( "Mean age is: " + ageU.getMean() );
System.out.println( "Mean income is: " + incomeU.getMean() );
Better error handling is needed near our use of PropertyUtils.
This patch introduces a dependency on commons-beanutils, which in turn depends
on commons-collections and commons-logging.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140863 13f79535-47bb-0310-9956-ffa450edef68
* a distribution factory following the abstract factory pattern.
The value being, if users want to swap out the default distribution
implementations with their own, why stop them. The factory is responsible for
create the distribution instances (only continuous ones for now).
* Each distribution has a cummulativeProbabilty method which returns the value of
the CDF for a given value. By default, via the abstract distribution base
class, an inverseCummulativeProbability method is all provided for all
distributions. It's implementation is generically handled by applying root
finding techniques to the cummulativeProbability method. That way, when new
distributions are added, authors only need to create the CDF method and the
inverse is provided automatically.
* Currenty, the only distributions are Chi-Squared and Gamma (one actually since
Chi-Squared is a specialized Gamma) but more are planned.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140861 13f79535-47bb-0310-9956-ffa450edef68