Commit Graph

5158 Commits

Author SHA1 Message Date
Phil Steitz 3de23df528 Fixed error in getCumFreq (use custom comparator when one is supplied). Removed tabs.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141118 13f79535-47bb-0310-9956-ffa450edef68
2004-03-07 00:54:31 +00:00
Phil Steitz e5bc149a2a Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141116 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 04:25:09 +00:00
Tim O'Brien 1ea467cb36 Added JavaDoc to the Complex class, still more work to be done.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141112 13f79535-47bb-0310-9956-ffa450edef68
2004-02-29 19:52:01 +00:00
Tim O'Brien 4ae88357f2 Added Javadoc to the ComplexFormat class
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141111 13f79535-47bb-0310-9956-ffa450edef68
2004-02-29 19:40:39 +00:00
Brent Worden d948617ae5 PR: 27243
Obtained from: Scott Duchin
Submitted by: Brent Worden

Adding Scott's unit test.  See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27243 for details.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141109 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 21:58:33 +00:00
Phil Steitz e884e834f8 javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141105 13f79535-47bb-0310-9956-ffa450edef68
2004-02-22 22:01:29 +00:00
Phil Steitz 466c8f4211 Updated license to 2.0
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141104 13f79535-47bb-0310-9956-ffa450edef68
2004-02-21 21:35:18 +00:00
Phil Steitz 424d644417 javadoc, error message cleanup.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141103 13f79535-47bb-0310-9956-ffa450edef68
2004-02-20 06:22:39 +00:00
Phil Steitz f41527455c Added degree() method, degree checking in derivative computations, made constructor copy coefficient array, cleaned up javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141102 13f79535-47bb-0310-9956-ffa450edef68
2004-02-20 06:17:54 +00:00
Brent Worden 70106770ea fixed spelling error: cummulative -> cumulative.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141100 13f79535-47bb-0310-9956-ffa450edef68
2004-02-18 04:04:18 +00:00
Phil Steitz a3c8daf76c Restored original copyright date.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141099 13f79535-47bb-0310-9956-ffa450edef68
2004-02-18 03:24:20 +00:00
Phil Steitz 31a89ac8db Restored test code inadvertently deleted with last commit.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141098 13f79535-47bb-0310-9956-ffa450edef68
2004-02-17 04:33:16 +00:00
Phil Steitz 9267ae3bb2 Fixed logic in bean transformer tests to match API.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141097 13f79535-47bb-0310-9956-ffa450edef68
2004-02-16 07:04:04 +00:00
Phil Steitz 11da77c693 Stopped header comments from confusing javadoc tool.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141096 13f79535-47bb-0310-9956-ffa450edef68
2004-02-16 06:32:47 +00:00
Phil Steitz 1d2c37a6ce Commented out sysouts.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141095 13f79535-47bb-0310-9956-ffa450edef68
2004-02-16 06:30:21 +00:00
Phil Steitz 0edbfb6b89 Added load(double[]) method to EmpiricalDistribution.
Contributed by Piotr Kochanski
PR # 26772


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141092 13f79535-47bb-0310-9956-ffa450edef68
2004-02-12 04:35:09 +00:00
Tim O'Brien 9ca4863232 *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141090 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 22:09:28 +00:00
Phil Steitz 21ef26838d Refactored Frequency to support cummulative frequency counts and percentages. Also eliminated the name property.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141089 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 19:51:25 +00:00
Phil Steitz f1e2670f72 Added bound to simulation loop in nextPoisson().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141088 13f79535-47bb-0310-9956-ffa450edef68
2004-01-31 06:58:46 +00:00
Mark R. Diggory 9698abfb3b Removing default generated @author Administrator tags from Eclipse
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141080 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 16:54:05 +00:00
Mark R. Diggory de37f31a2a Actually, we should really be switching to Apache license 2.0.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141079 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 16:52:41 +00:00
Phil Steitz f6458ee9d0 Replaced unnecessary bin search with direct computation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141078 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 06:26:14 +00:00
Phil Steitz 90be3c8e9d Speed up, clean up.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141077 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 05:27:54 +00:00
Phil Steitz 36d2a54a37 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141076 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 04:58:36 +00:00
Tim O'Brien ec5fb0ca3d Added a simple formatting class for Complex numbers.
I had considered just implementing toString() on the complex
class, but I decided aginst it because some fields prefer
"j" to "i".  This ComplexFormat class is very straightforward,
will a number of TODOs, it is accompanied by a 10
tests.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141075 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 04:32:27 +00:00
Mark R. Diggory 19080d7f09 Happy New Year, updating all license years to 2004
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141074 13f79535-47bb-0310-9956-ffa450edef68
2004-01-29 00:49:03 +00:00
Tim O'Brien 204063d317 RealMatrix now throws two more runtime exceptions
InvalidMatrixException and MatrixIndexException


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141070 13f79535-47bb-0310-9956-ffa450edef68
2004-01-28 20:15:03 +00:00
Phil Steitz 00cfd0a1ae Eliminated unecessary first moment computations.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141068 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 02:43:44 +00:00
Mark R. Diggory 9dbee2f04e PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24962
Obtained from: sergei skarupo

Refactored all sign methods to indicator.
Created new Sign methods per wolfram specs.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141067 13f79535-47bb-0310-9956-ffa450edef68
2004-01-26 19:41:16 +00:00
Phil Steitz fcde02ecce Added Normal Distribution implementations and tests contributed by Piotr Kochanski.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141065 13f79535-47bb-0310-9956-ffa450edef68
2004-01-26 03:04:31 +00:00
Phil Steitz 1b96f28e41 Refactored statistical aggregates to separate stored, storeless implementations. Changed internal sample size counters to longs.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141064 13f79535-47bb-0310-9956-ffa450edef68
2004-01-25 21:30:41 +00:00
Phil Steitz 985aad0b1a javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141063 13f79535-47bb-0310-9956-ffa450edef68
2004-01-18 03:45:02 +00:00
Phil Steitz cc63455b3e Replace deprecated method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141061 13f79535-47bb-0310-9956-ffa450edef68
2004-01-15 07:31:44 +00:00
Phil Steitz dd670b29cf Updated copyright date (after BZ #25972 changes).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141059 13f79535-47bb-0310-9956-ffa450edef68
2004-01-15 05:22:08 +00:00
William Barker 98e2fabf90 Fix URL -> File conversion in the test.
I'd forgotten that I had added this to my code when looking at BZ #25972.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141056 13f79535-47bb-0310-9956-ffa450edef68
2004-01-11 20:50:11 +00:00
Phil Steitz d0ac3d2a5f Modified tests to reflect changes addressing PR #25972.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141052 13f79535-47bb-0310-9956-ffa450edef68
2004-01-11 07:26:51 +00:00
Phil Steitz e8098d425e Refactored file handling methods to eliminate use of URL.toFile(). Addressing PR #25972, reported by Bill Barker.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141051 13f79535-47bb-0310-9956-ffa450edef68
2004-01-11 07:24:30 +00:00
Phil Steitz 77a52d9827 Refactored load methods to eliminate use of URL.toFile(). Addressing PR #25972, reported by Bill Barker.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141050 13f79535-47bb-0310-9956-ffa450edef68
2004-01-11 07:22:14 +00:00
Phil Steitz cc68314882 Added load(URL). Addressing PR #25972, reported by Bill Barker.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141049 13f79535-47bb-0310-9956-ffa450edef68
2004-01-11 07:19:52 +00:00
Joerg Pietschmann 54309a11ca Added documentation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141048 13f79535-47bb-0310-9956-ffa450edef68
2003-12-27 15:22:34 +00:00
Mark R. Diggory f608f7503c Additional Matrix Multiply test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141046 13f79535-47bb-0310-9956-ffa450edef68
2003-11-23 20:34:41 +00:00
Mark R. Diggory b84b723efa Patch to correct error in matrix multiply
and the addition od toString method.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141045 13f79535-47bb-0310-9956-ffa450edef68
2003-11-23 20:16:17 +00:00
Mark R. Diggory 4fc6b5e54e New additions of CholeskySolver contributed by Stefan Koeberle
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141044 13f79535-47bb-0310-9956-ffa450edef68
2003-11-23 19:53:40 +00:00
Brent Worden 04094833d5 Here's my idea for approximating derivatives. It follows the decorator layout of commons-collections. The main interface point is the UnivariateRealFunctionUtils type which is responisble for creating decorated UnivariateRealFunction objects. To demostrate the how the decorators could be used, I added the UnivariateRealFunctionUtilsTest class which computes a local maximum of a function using derivative decorators and the default solver.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141043 13f79535-47bb-0310-9956-ffa450edef68
2003-11-22 05:59:31 +00:00
Mark R. Diggory 8406e7ae61 extends MathException....
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141042 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 04:26:38 +00:00
Mark R. Diggory 4683ebbf93 I've thought about this and I like the idea of getting some of this code available in the cvs for experimentation, I'm going ahead and adding it for others to look at and consider.
This directory will not get compiled into the regular build process or future distributions. We can work on an ant script to provide easy build of this if others think it neccessary.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141041 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 04:22:17 +00:00
Mark R. Diggory 3c0ef74e44 JUnit testing of serialization of all StorelessUnivariates
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141039 13f79535-47bb-0310-9956-ffa450edef68
2003-11-19 13:35:10 +00:00
Mark R. Diggory 29aba171ed Additional tooling for simple JUnit testing of serialization.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141038 13f79535-47bb-0310-9956-ffa450edef68
2003-11-19 13:26:42 +00:00
Mark R. Diggory c468a07aa6 Added Serialization Interface to all Implementations
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141036 13f79535-47bb-0310-9956-ffa450edef68
2003-11-19 03:28:25 +00:00
Mark R. Diggory 0718895962 Exposed MathException handling in Distributions by adding thows MathException to methods where MathExceptions are caught and replaced with Double.NaN. Added Serialization Interface to Distributions, BivariateRegression and TestStatistic
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141035 13f79535-47bb-0310-9956-ffa450edef68
2003-11-19 03:22:54 +00:00
Mark R. Diggory 0810e249ac fix for wrong results and stack overflow error from BivariateRegression
PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24747
Obtained from:
Submitted by:	Sergei Skarupo, Brent Worden 
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141034 13f79535-47bb-0310-9956-ffa450edef68
2003-11-18 15:07:12 +00:00
Mark R. Diggory 7374ff2c48 Older versions of the txt files that currently exist in this directory.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141028 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 20:02:46 +00:00
Dirk Verbeeck 3619649ce9 PR: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg29959.html
Submitted by:	Matt Cliff
  Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141026 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 19:04:28 +00:00
Dirk Verbeeck b033502afa reapply DefaultTransformer update
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141025 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 19:02:45 +00:00
Dirk Verbeeck 90017dc7e7 remove logging
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141024 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 18:59:10 +00:00
Dirk Verbeeck 14bbddbc4c remove old files
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141023 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 18:56:16 +00:00
Dirk Verbeeck 8864381a96 Applied Brent Wardens Bug fixes to Complex implementation and tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141022 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 18:52:31 +00:00
Dirk Verbeeck d916ecceb2 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24598
Submitted by:	Brent Worden
  Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141021 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 18:47:09 +00:00
Dirk Verbeeck c9a0955115 PR: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg29959.html
Submitted by:	Matt Cliff
  Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141020 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 18:44:52 +00:00
Dirk Verbeeck e5833affa1 Reapply changes (mdiggory 2003/11/10 09:43:34)
Moving Distributions to higher level location from o.a.c.m.stat.distirbutions to o.a.c.m.distirbutions
Changing Names of Univariates to DescriptiveStatistics and replacing Interface with Abstract Factory Implementation
Moving BeanTransformer and ListUnivariate implmenetations to test directory.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141016 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 16:01:42 +00:00
Mark R. Diggory 8cf1bdb6b9 Attempting to recover last revision.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141015 13f79535-47bb-0310-9956-ffa450edef68
2003-11-14 22:33:34 +00:00
Mark R. Diggory f61c462ffe these were removed earlier than 11/1/03
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141014 13f79535-47bb-0310-9956-ffa450edef68
2003-11-14 22:29:41 +00:00
Mark R. Diggory b3a6a6b3b5 Attempting to recover last revision.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141013 13f79535-47bb-0310-9956-ffa450edef68
2003-11-14 22:25:28 +00:00
Mark R. Diggory dd899e75fc Recovering
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141012 13f79535-47bb-0310-9956-ffa450edef68
2003-11-14 21:50:39 +00:00
Mark R. Diggory e389289e77 Committing promotion to commons proper!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141010 13f79535-47bb-0310-9956-ffa450edef68
2003-11-01 16:09:22 +00:00
Mark R. Diggory fe5d7c1693 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24241
Submitted by:	Brent Worden


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141007 13f79535-47bb-0310-9956-ffa450edef68
2003-10-30 19:42:43 +00:00
Mark R. Diggory 005c054edd Rewrite StatUtils to use static instances of UnivariateStatistics. Benefits?
1.) In the future, when we establish "Factories" for these objects, we'll be able to plug implementations in, even under our static Utilities classes for these functions. 

2.) The  user can always rely on the same result, whether using the StaticUtil, Univariate Container or direct UnivariateStatistic.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141005 13f79535-47bb-0310-9956-ffa450edef68
2003-10-16 15:59:40 +00:00
Mark R. Diggory a4947309cd PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23716
Submitted by:	Brent Warden	
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141004 13f79535-47bb-0310-9956-ffa450edef68
2003-10-16 15:24:33 +00:00
Mark R. Diggory eb4d267f51 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23453
Submitted by:	Brent Warden
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141003 13f79535-47bb-0310-9956-ffa450edef68
2003-10-16 15:15:04 +00:00
Robert Burrell Donkin 595e470d70 Fixed typos in apache license
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141001 13f79535-47bb-0310-9956-ffa450edef68
2003-10-13 08:11:44 +00:00
Mark R. Diggory d8931052e4 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23187
Obtained from:
Submitted by:	Brent Worden 
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140999 13f79535-47bb-0310-9956-ffa450edef68
2003-09-27 04:13:34 +00:00
Joerg Pietschmann 609917a77c Fixed JavaDoc warnings.
Fixed a few TODOs in the interpolation code.
Updated project TODO list.
Promoted myself to "developer".


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140998 13f79535-47bb-0310-9956-ffa450edef68
2003-09-26 19:30:33 +00:00
Mark R. Diggory 5971a93e3f PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23013
Submitted by:	Brent Warden
Reviewed by:	Mark Diggory

I also regenerated the build.xml using Maven to get the Discovery dependency added in.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140996 13f79535-47bb-0310-9956-ffa450edef68
2003-09-17 19:29:32 +00:00
Mark R. Diggory 4b7bef4b26 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23010
Submitted by:	 Brent Worden 
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140995 13f79535-47bb-0310-9956-ffa450edef68
2003-09-17 19:19:09 +00:00
Mark R. Diggory ffa6aac264 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22954
Submitted by:	Brent Worden
Reviewed by:	Mark Diggory


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140994 13f79535-47bb-0310-9956-ffa450edef68
2003-09-07 03:12:56 +00:00
Joerg Pietschmann 606b836061 Added classes for binominal distribution and some infrastructure for other
discrete distributions.
Contributed by Brent Worden (brent@worden.org)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140993 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 17:06:15 +00:00
Mark R. Diggory b3b89139bb Just Checkstyle and Javadoc corrections
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140991 13f79535-47bb-0310-9956-ffa450edef68
2003-08-09 04:03:41 +00:00
Tim O'Brien 5ba1bde434 Bugzilla #22002 from Brent W's patch - refactoring of UnivariateRealSolver
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140989 13f79535-47bb-0310-9956-ffa450edef68
2003-07-30 22:06:37 +00:00
Tim O'Brien 233420ee6b Bugzilla #22002: applied Brent W's patch which dealt with URSFactory and URSFImpl as well as numerous improvements to javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140988 13f79535-47bb-0310-9956-ffa450edef68
2003-07-30 21:58:11 +00:00
Mark R. Diggory 2f4e703627 Application of "apply(Functor x)" strategy (thank you Al Chou) for evaluating UnivariateStatistics against the internal storage collection without exposing the collection or its bounds.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140987 13f79535-47bb-0310-9956-ffa450edef68
2003-07-15 03:45:10 +00:00
Mark R. Diggory 1d62c398db minor javadoc cleanup
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140986 13f79535-47bb-0310-9956-ffa450edef68
2003-07-15 03:38:50 +00:00
Mark R. Diggory 45a605897e minor javadoc cleanup
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140985 13f79535-47bb-0310-9956-ffa450edef68
2003-07-15 03:37:11 +00:00
Tim O'Brien 2ab38de232 Patch for bug 21516 from Brent Worden. Fixed checkstyle bugs and added maven.javadoc.links to project.properties
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140984 13f79535-47bb-0310-9956-ffa450edef68
2003-07-11 15:59:14 +00:00
Mark R. Diggory 7c808d9071 Changes the Univariate implementations to use the UnivariateStatistic package. Slims down StatUtils by removing some of the higher moments. Reimplmenets ListUnivariate to work with NumberTransformers, turning into a Mixed Object List Univariate.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140983 13f79535-47bb-0310-9956-ffa450edef68
2003-07-09 21:46:33 +00:00
Mark R. Diggory d082672a80 Removing @author tags, adding missing @version tags.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140981 13f79535-47bb-0310-9956-ffa450edef68
2003-07-09 20:04:13 +00:00
Mark R. Diggory 31166f2bbb Changing getValue to getResult.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140980 13f79535-47bb-0310-9956-ffa450edef68
2003-07-09 16:28:30 +00:00
Mark R. Diggory fe37437c08 In cases where "getResult" contains a statistical calculation, it now
checks if the internal state of the underlying statistic has changed 
and only recalculates if this is true. this way muliple calls to getResult 
when the staistic has not been incremented are less expensive 
because it is only returning a property value.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140979 13f79535-47bb-0310-9956-ffa450edef68
2003-07-09 16:24:18 +00:00
Mark R. Diggory 7ec4d3874c Its more logical not to have increment return a value, this allows a
distict separation between the calculation of moments and the 
calculation of the actually return value of getVlaue in Storageless 
approaches. With this benifit it is no longer neccessary to calculate 
all the statistics moment based statistics on addValue, only the 
underlying moment itself.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140976 13f79535-47bb-0310-9956-ffa450edef68
2003-07-08 03:44:12 +00:00
Mark R. Diggory 9a827be03a Removing more of my author tags.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140975 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 23:25:14 +00:00
Mark R. Diggory 7b6c61666e PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21360
Submitted by:	phil@steitz.com

I applied this patch on the sourcecode, I think all project.xml and 
xdoc documentation should retain some authorship at this time. If 
we decide otherwise we can change this in the future.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140974 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 23:19:22 +00:00
Mark R. Diggory 4bf125a356 This commit adds the constructor and internals for setting and External Moment object to base internal calculations on. It also remove author tags and adds a new class FirstMoment to the project.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140973 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 23:06:48 +00:00
Mark R. Diggory 512f698edd Fixing GeoMean and adding appropriate test.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140972 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 16:57:33 +00:00
Mark R. Diggory 41ac4c9203 removed extra calculation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140971 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 14:15:20 +00:00
Mark R. Diggory faa703e40e Addition of optimal array based evaluations available in StatUtils. These are not delegates to StatUtils, they are implementations.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140969 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 02:15:19 +00:00
Mark R. Diggory b6871d607e Adding incremental tests for storeless univariates as evaluations are now based on the implementations that were previously provided by StatUtils.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140968 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 02:12:47 +00:00
Mark R. Diggory 346a5756eb Rolling Back StatUtils to previous version.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140967 13f79535-47bb-0310-9956-ffa450edef68
2003-07-06 07:18:08 +00:00
Mark R. Diggory bc5950acb5 Fixes Compilation error that did not get commited last time.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140966 13f79535-47bb-0310-9956-ffa450edef68
2003-07-06 03:27:47 +00:00
Mark R. Diggory 8ca0c4c848 Correcting checkstyle and javadoc errors.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140965 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 19:25:38 +00:00
Mark R. Diggory 77aa09dab9 This is an Implementation of StatUtils that uses the new UnivariateStatistic Framework and passes all JUnit StatUtils tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140963 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:29:35 +00:00
Mark R. Diggory 88d6952806 Initial Tests for UnivariateStatistic package Hierarchy.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140962 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:24:50 +00:00
Mark R. Diggory aa40a7e7ce This commit adds the individual UnivariateStatistic package hierarchy, this hierarchy
is currently independent of the Univariate and StoreUnivariate Implementations and provides
storeless and storage based mechanisms for working with the individual
UnivariateStatistic implementations.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140961 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:23:52 +00:00
Mark R. Diggory b95322ce3d This patch exposes the start index, internal double array of DOubleArray Implementations.
It adds a NumberTransformer framework for mapping Objects and Bean Properties to double primitives
It also corrects some checkstyle and javadoc errors.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140960 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:20:02 +00:00
Mark R. Diggory 0fd2f5fd11 This patch exposes the start index, internal double array of DOubleArray Implementations.
It adds a NumberTransformer framework for mapping Objects and Bean Properties to double primitives
It also corrects some checkstyle and javadoc errors.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140959 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:13:35 +00:00
Mark R. Diggory 2b5b0e7a14 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21313
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140958 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 18:05:31 +00:00
Mark R. Diggory 561a4c85e7 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21295
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140957 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 17:58:17 +00:00
Mark R. Diggory 62577ea18b Removal of statistical (min/max) and deleteFrontElements methods from DoubleArray interface (per our previous discussion)
Adjusted dependent Test and StoreUnivariateImpl classes accordingly to accomidate changes.

Added new constructor to FixedDoubleArray for double[].


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140955 13f79535-47bb-0310-9956-ffa450edef68
2003-06-27 20:58:28 +00:00
Mark R. Diggory fd93fdf0a4 Eliminated extra pass to calc mean in std calculation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140954 13f79535-47bb-0310-9956-ffa450edef68
2003-06-27 20:31:52 +00:00
Mark R. Diggory 220d14781d moving test solvers to test directory
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140953 13f79535-47bb-0310-9956-ffa450edef68
2003-06-27 04:59:53 +00:00
Mark R. Diggory 2a0f365958 These only need to be in tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140952 13f79535-47bb-0310-9956-ffa450edef68
2003-06-27 04:59:27 +00:00
Mark R. Diggory 542211e8c4 Exceptions handling for math packages
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140951 13f79535-47bb-0310-9956-ffa450edef68
2003-06-27 04:29:42 +00:00
Mark R. Diggory eccc4d8878 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21005
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140949 13f79535-47bb-0310-9956-ffa450edef68
2003-06-25 01:39:36 +00:00
Mark R. Diggory a4c605d8a6 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21003
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140948 13f79535-47bb-0310-9956-ffa450edef68
2003-06-25 01:35:46 +00:00
Mark R. Diggory a235488095 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21023
Submitted by:	j3322ptm@yahoo.de HotFusionMan@Yahoo.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140947 13f79535-47bb-0310-9956-ffa450edef68
2003-06-25 01:29:18 +00:00
Mark R. Diggory 0d757f3e99 Added Checks for Exceptions
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140946 13f79535-47bb-0310-9956-ffa450edef68
2003-06-24 14:08:40 +00:00
Mark R. Diggory fed1f17d61 Additon of begin and length controls to StatUtils. Addition on test for array conditions.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140945 13f79535-47bb-0310-9956-ffa450edef68
2003-06-24 14:03:32 +00:00
Mark R. Diggory 65062ddc86 This is the second half of this pr. Commit of analysis solver tests.
PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20844
Submitted by:	J. Pietschman


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140944 13f79535-47bb-0310-9956-ffa450edef68
2003-06-24 03:02:28 +00:00
Mark R. Diggory 50520ebc12 This is the first half of this pr. Commit of analysis solvers.
PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20844
Submitted by:	J. Pietschman


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140943 13f79535-47bb-0310-9956-ffa450edef68
2003-06-24 03:01:40 +00:00
Mark R. Diggory 4f17b718b3 Initial commit of package refactorings discussed in the group.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140942 13f79535-47bb-0310-9956-ffa450edef68
2003-06-22 03:57:57 +00:00
Mark R. Diggory 9b2b61b777 Removing Product from Univariate Interface, applying sumLog changes to geomean in AbstractStoreUnivariate.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140941 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 23:38:27 +00:00
Mark R. Diggory 8936d6e3a6 moving TestStatistic to stat package.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140940 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 23:07:23 +00:00
Mark R. Diggory 7dc1c05c59 Moving TestStatisticTest to stat package.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140939 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 23:02:51 +00:00
Mark R. Diggory 5e7fe90154 Moving TestStatistic implementation / interface into stat package.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140938 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 23:00:39 +00:00
Mark R. Diggory 8d3d1889fb Removed last of the Math.pow's
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140937 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 02:54:55 +00:00
Mark R. Diggory b84e9460b5 This is a multifile commit, it covers checkstyle errors in javadoc etc.
PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20936
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140936 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 02:21:49 +00:00
Mark R. Diggory d3f4480aff PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20980
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140935 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 02:16:43 +00:00
Mark R. Diggory 81c03fcee2 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20979
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140934 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 02:13:41 +00:00
Mark R. Diggory 7e2a7b5027 Adding tests for kurtosis and skew to UnivariateImpl testcase. Correcting initialization of moments in UnivariateImpl.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140933 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 02:08:23 +00:00
Mark R. Diggory e3ea7f7638 Removing mode.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140932 13f79535-47bb-0310-9956-ffa450edef68
2003-06-21 01:55:17 +00:00
Mark R. Diggory 0da1561627 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20964
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140931 13f79535-47bb-0310-9956-ffa450edef68
2003-06-20 21:05:47 +00:00
Tim O'Brien db0b59b9bc Removed the proposed solvers, many compilation problems and a broken unit test.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140930 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 21:25:03 +00:00
Tim O'Brien bc173f639f 1. Gamma.logGamma was expecting epsilon and maxIterations but these parameters
were not being referenced in that function.  These parameters has been removed.

2. Also, the Lanczos coefficients are now a private static member variable of
the Gamma class.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140927 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 20:02:27 +00:00
Mark R. Diggory 0191e6129b Initial Deposit for StatUtils unit testing, this was derived from StoreUnivariateImplTest.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140926 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 15:59:55 +00:00
Mark R. Diggory 283716c077 Last commit got formated with tabs, this is formated with spaces
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140925 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 13:57:24 +00:00
Mark R. Diggory 202a38df83 Degegates to StatUtils now for "window" case. Implemented skew and kurt using recursive moments.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140924 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 13:47:35 +00:00
Mark R. Diggory c4c3868df6 Rolling back to previous version.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140923 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 12:42:24 +00:00
Mark R. Diggory 5179d78ef8 Simplified calculation, removing extra division.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140922 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 03:05:45 +00:00
Mark R. Diggory 7c57c2ed60 Adding corrected two-pass algorithm for variance calculation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140921 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 03:01:28 +00:00
Mark R. Diggory 374b62d120 Addition of sumLog method (natural) to get the sum of the Logs. Altered GeometricMean to calculate the geometricMean from the sum of logs.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140920 13f79535-47bb-0310-9956-ffa450edef68
2003-06-18 01:56:03 +00:00
Mark R. Diggory d4f6a5c818 Addition of product and geometericMean.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140919 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 23:23:07 +00:00
Mark R. Diggory 175c7c5fce Missed two static signatures in the methods
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140918 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 23:00:17 +00:00
Mark R. Diggory 5acc48ef8d Initial Addition of StatUtils. Some methods need review, implementation and possibly debugging
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140917 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 22:55:38 +00:00
Tim O'Brien 4de94a08c7 alternative root finding framework, and Brent-Drekker solver
Issue: 20844
Submitted by: J. Pietschmann
Reviewed by: T. O'Brien


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140916 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 21:16:08 +00:00
Mark R. Diggory 9318b7a749 Rolling back to version 1.5 to provide for group discussion on the subject
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140915 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 17:10:15 +00:00
Mark R. Diggory 32fd0d5a52 I'm not sure with this algorithm, but I'm going to add this test back into the Variance that protects it from returning a value less than 0.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140914 13f79535-47bb-0310-9956-ffa450edef68
2003-06-16 21:38:15 +00:00
Mark R. Diggory 0811c1790b More correction of Javadoc errors.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140913 13f79535-47bb-0310-9956-ffa450edef68
2003-06-16 21:29:49 +00:00
Mark R. Diggory 606ef299cc More correction of Javadoc errors that end up propigating into UnivarImpl and other implementations.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140912 13f79535-47bb-0310-9956-ffa450edef68
2003-06-16 21:24:30 +00:00
Mark R. Diggory d246044d45 Correction of Javadoc errors that end up propigating into UnivarImpl and other implementations.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140911 13f79535-47bb-0310-9956-ffa450edef68
2003-06-16 20:58:53 +00:00
Mark R. Diggory 1be3d32358 This house-cleaning improves UnivariateImpl, in a number of ways.
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
2003-06-16 20:42:24 +00:00
Tim O'Brien 464aac515f Added the graceful handling of invalid and NaN domain values. Created test
cases to verify the graceful handling.

Issue #: 20774
Submitted By: Brent Worden
Reviewed By: Tim O'Brien


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140909 13f79535-47bb-0310-9956-ffa450edef68
2003-06-16 20:13:43 +00:00
Mark R. Diggory 3f313dff3a PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20782
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
2003-06-16 14:29:30 +00:00
Mark R. Diggory 765db662a5 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20783
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140907 13f79535-47bb-0310-9956-ffa450edef68
2003-06-15 17:01:39 +00:00
Mark R. Diggory 09c8b57924 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20773
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140906 13f79535-47bb-0310-9956-ffa450edef68
2003-06-14 04:24:43 +00:00
Mark R. Diggory d20ee8ab0e PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20766
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140905 13f79535-47bb-0310-9956-ffa450edef68
2003-06-14 04:17:49 +00:00
Mark R. Diggory 3849e21f3b PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20633
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140903 13f79535-47bb-0310-9956-ffa450edef68
2003-06-13 13:22:41 +00:00
Tim O'Brien 83855b4cd7 Submitted Javadoc fixes from Andreou Andreas
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140902 13f79535-47bb-0310-9956-ffa450edef68
2003-06-11 14:50:30 +00:00
Mark R. Diggory 16c19dcec0 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20627
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140901 13f79535-47bb-0310-9956-ffa450edef68
2003-06-11 11:14:41 +00:00
Tim O'Brien 431f303889 * Fixed all checkstyle errors and eliminated redundant NaN checks. Now have
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
2003-06-11 03:33:05 +00:00
Mark R. Diggory b58585fb8d PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20601
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140899 13f79535-47bb-0310-9956-ffa450edef68
2003-06-11 01:19:19 +00:00
Mark R. Diggory 8d1482c461 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20570
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140898 13f79535-47bb-0310-9956-ffa450edef68
2003-06-07 13:57:54 +00:00
Mark R. Diggory a6c324e669 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20543
Submitted by:	phil@steitz.com


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140897 13f79535-47bb-0310-9956-ffa450edef68
2003-06-07 01:36:57 +00:00
Mark R. Diggory 1999928282 Resolved some href " issues in Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140896 13f79535-47bb-0310-9956-ffa450edef68
2003-06-06 03:38:03 +00:00
Mark R. Diggory aa3e2e9ef4 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20496
Submitted by:	Albert Davidson Chou


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140895 13f79535-47bb-0310-9956-ffa450edef68
2003-06-06 03:07:39 +00:00
Mark R. Diggory 41d1a0d8f0 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20514
Submitted by:	brent@worden.org


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140894 13f79535-47bb-0310-9956-ffa450edef68
2003-06-05 18:35:24 +00:00
Mark R. Diggory 2dec2474f9 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20488
Submitted by:	Brent Worden

Initial submission of the distribution library


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140892 13f79535-47bb-0310-9956-ffa450edef68
2003-06-05 14:03:53 +00:00
Mark R. Diggory ed6d94077f fixed href link to have ""'s
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140888 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 12:23:44 +00:00
Mark R. Diggory acde85f2bf Improved Variance calculation, test for negative variance and added some more javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140887 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 04:05:39 +00:00
Mark R. Diggory b3dd72f6e0 Adjusted the code to be able to control the files used and the tolerance for each file (important, hard tests currently require lower tolerance to pass).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140886 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 04:03:55 +00:00
Mark R. Diggory ba74c2510f PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20442
Submitted by:	Phil Steitz


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140885 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 02:45:49 +00:00
Mark R. Diggory 42e427ce8c PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20390
Submitted by:	Phil Steitz


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140883 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 02:31:14 +00:00
Mark R. Diggory 516c15d88b PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20377
Submitted by:	Phil Steitz


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140882 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 02:24:51 +00:00
Mark R. Diggory 11898601e0 PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20375
Submitted by:	Albert Davidson Chou


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140881 13f79535-47bb-0310-9956-ffa450edef68
2003-06-04 02:17:17 +00:00
Mark R. Diggory 108ea5741c Changing the name of data files, the default javac target in the ant file misses files of the extension "dat"
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140880 13f79535-47bb-0310-9956-ffa450edef68
2003-06-02 05:21:06 +00:00
Mark R. Diggory 546eeaf219 Commenting out testUnivariateImpl unitl I figure out why this fails in UnivariateImpl
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140879 13f79535-47bb-0310-9956-ffa450edef68
2003-06-02 04:58:33 +00:00
Mark R. Diggory 5a755b8f82 Removed System.out's
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140877 13f79535-47bb-0310-9956-ffa450edef68
2003-06-02 04:27:26 +00:00
Mark R. Diggory 60314410e2 Initial Certified Tests for Univariate. Note UnivariateImpl currently fails
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140876 13f79535-47bb-0310-9956-ffa450edef68
2003-06-02 04:25:52 +00:00
Tim O'Brien d23bf18b40 Licensing issues have prompted the removal of all source reliant on
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
2003-06-02 03:44:13 +00:00
Tim O'Brien 429a652114 Removed old Univariate tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140869 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 23:25:12 +00:00
Tim O'Brien a286c243eb Moved all Univariate and Bivariate stats interfaces and classes to the math.stat package
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140867 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 20:35:46 +00:00
Tim O'Brien be5a9fb219 Patch adds getSkewness and getKurtosis to Univariate and an implimentation
in UnivariateImpl. It also adds test for NaN and 0.0 to UnivariateImplTest

PR: Issue 20250
Obtained from: Bugzilla
Submitted by: Mark Diggory
Reviewed by: Tim O'Brien


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140866 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 19:49:18 +00:00
Tim O'Brien 8a13741f2d Adds the following two capabilities to RandomData: Generating random permutations
of integers, Generating random samples (returned as Object arrays) from Collections.
Tests validate expected sample distribtution using chi-square tests

PR: Issue 20303
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@140865 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 19:45:35 +00:00
Tim O'Brien c9fc45757a Addition of a BeanListUnivariateImpl which can gather univariate statistics on a
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
2003-05-29 19:41:32 +00:00
Tim O'Brien 3cb56af4e4 Unit tests for previous commit - from Brent Worden's submission in Bugzilla Issue 20279
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140862 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 19:35:56 +00:00
Tim O'Brien 703fbafa34 Contributions from Brent Worden - Bugzilla Issue 20279
* 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
2003-05-29 19:34:38 +00:00
Tim O'Brien 03e996b075 Fixed spelling of INFINITE_WINDOW.
PR: 20234
Submitted by: Al Chou


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140860 13f79535-47bb-0310-9956-ffa450edef68
2003-05-26 17:40:20 +00:00
Tim O'Brien 43c787eb35 Adds the one sample, t-test statistic to TestStatistic and implementations.
Also add unit tests. - BW

PR: Issue #20231
Obtained from: Bugzilla
Submitted by: Brent Worden
Reviewed by: Tim O'Brien


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140859 13f79535-47bb-0310-9956-ffa450edef68
2003-05-26 17:29:36 +00:00
Tim O'Brien 57b9151881 An implementation of ordinary least squares regression with one independent
variable. The implementation uses running sums and does not require the data
to be stored in memory.  Since I could not conceive of any significantly
different implementation strategies that did not amount to just improving
efficiency or numerical accuracy of what I am submitting, I did not abstract
the interface.

The test cases validate the computations against NIST reference data and
verified computations. The slope, intercept, their standard errors and
r-square estimates are accurate to within 10E-12 against the reference data
set.  MSE and other ANOVA stats are good at least to within 10E-8. -- Phil S.

PR: Issue #20224
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@140858 13f79535-47bb-0310-9956-ffa450edef68
2003-05-26 02:11:50 +00:00
Tim O'Brien b84e61ffcf From Phil Steitz patch submission for Issue #20175
The attached patch includes the following improvements to Univariate and
UnivariateImpl:

* Improved efficiency of min, max and product maintenance when windowSize is
  limited by incorporating suggestion posted to commons-dev by Brend Worden
  (added author credit).  Thanks, Brent!

* Added javadoc specifying NaN contracts for all statistics, definitions for
  geometric and arithmetic means.

* Made some slight modifications to UnivariateImpl to make it consistent with
  NaN contracts

* All interface documentation moved to Univariate. The interface specification
  includes the NaN semantics and a first attempt at clealy defining exactly
  what "rolling" means and how this effects what statistics are defined when.

* Added test cases to verify that min, max, product are correctly maintained
  when "rolling" and to verify that NaN contracts are satisfied.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140857 13f79535-47bb-0310-9956-ffa450edef68
2003-05-23 17:33:18 +00:00
Tim O'Brien 8216dd89b5 RandomDataTest.testNextGaussian() was using Univarite.getN(). Added
an explicit cast from int to double.  Test now succeeds.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140854 13f79535-47bb-0310-9956-ffa450edef68
2003-05-22 15:31:38 +00:00
Tim O'Brien ca304541d8 The EmpiricalDistributionImpl that submitted yesterday assumed the "old"
Univariate interface, in which getN() returned a double.  The attached patch
inserts the necessary casts to avoid the rounding/truncation errors that were
causing the EmpiricalDistribution and ValueServer unit tests to fail.

The patch also adds a RandomData member variable so that getNext() does not
instantiate a new RandomData instance for each activation

PR: Bugzilla #20149
Obtained from: Issue Patch
Submitted by: Phil Steitz
Reviewed by: Tim O'Brien


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140853 13f79535-47bb-0310-9956-ffa450edef68
2003-05-22 15:19:32 +00:00
Tim O'Brien 8ed6e84dc6 Added Product and Mean to Univariate and all implementations, this patch
contains contributions from Mark Diggory.

* This patch introduces Product and GeometricMean into the Univariate
implementation.

* Discarding the contribution of a discarded element in a rolling
UnivariateImpl requires that the product be calculated explicitly each
time a value is discarded.  This is necessary because not all values will
have non-zero values.

* Errors in rolling logic for ListUimpl, and UnivariateImpl were corrected,
and more test cases were added to the JUnit tests for the Univariate
implementations.  More rigorous test cases are needed for the entire
suite of Univariate implementations


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140851 13f79535-47bb-0310-9956-ffa450edef68
2003-05-21 17:59:20 +00:00
Tim O'Brien 5de3587b86 Commited patch for issue 20112 from Phil Steitz.
EmpiricalDistribution -- represents an empirical probability distribution and
supports generation of data values that are "like" values in an input file
without making any assumptions about the functional form of the probability
distribution that the data come from.   This is useful in simulation
applications where historical data about component performance are
available but do not follow standard distributions (or any application that
requires random data generation from an empirical distribution). Also
generates data for grouped frequency histograms based on the input file.

ValueServer -- a wrapper for RandomData and EmpiricalDistribution that
generates values in each of the following modes:
  * DIGEST_MODE -- uses an empirical distribution
  * REPLAY_MODE -- replays data from an input file
  * UNIFORM_MODE -- generates uniformly distributed random values
  * EXPONENTIAL_MODE -- generates exponentially distributed random
                        values
  * GAUSSIAN_MODE -- generates Gaussian distributed random values
  * CONSTANT_MODE -- returns the same value every time.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140848 13f79535-47bb-0310-9956-ffa450edef68
2003-05-21 14:21:15 +00:00
Tim O'Brien a99cbac0bb Updated class javadoc for ContractableDoubleArray
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140847 13f79535-47bb-0310-9956-ffa450edef68
2003-05-21 06:46:26 +00:00
Tim O'Brien 246d50aa44 Added more substantial class javadoc to ExpandableDoubleArray
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140846 13f79535-47bb-0310-9956-ffa450edef68
2003-05-21 06:24:30 +00:00
Tim O'Brien 5d9efdbcd4 Added javadoc to FixedDA and altered exceptions in DoubleArray
* One should be able to use a DoubleArray in a similar way to a
regular double[], to this effect methods for accessing element
values will no longer throw NoSuchElementExceptions when an
index is outside of the element set.  These method all throw
ArrayIndexOutOfBoundException if a bad index is supplied.

* Filled out javadoc in FixedDoubleArray.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140845 13f79535-47bb-0310-9956-ffa450edef68
2003-05-21 05:48:25 +00:00
Tim O'Brien 437e275a50 Updated source code to reflect Jakarta source code guidelines specifically
tab characters.  Changes were driven by Checkstyle report on
http://jakarta.apache.org/commons/sandbox/math


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140843 13f79535-47bb-0310-9956-ffa450edef68
2003-05-20 18:15:29 +00:00
Tim O'Brien 60f4205f1f Phil Steitz wrote:
This commit contains the suite of random data generation utilities that
I originally
proposed as extensions to lang.math.  There is some functional overlap
with lang.math, but the contract and intention of this implementation is
different in several significant ways.

* the lang implementation maintains "immutability" of the underlying
   random number generator (emulating Math). The RandomData
   implementation allows users to reseed the random number generator(s)
   (this is in effect possible in the recent extensions to lang.math by
   passing in a user-supplied random as an actual parameter to the
   next() methods) Users can also reset the PRNG algorithm and provider
   used by the "secure" methods.

* RandomData includes "secure" methods (delegating to SecureRandom)

* RandomData will generate random deviates from exponential and poisson,
   as well as Gaussian and Uniform distributions.  These are useful in
   simulation applications.

* Overlapping somewhat with lang.StringUtils, RandomData will generate
   random hex strings.  There is a nextSecureHexString method that will
   (I claim :-) generate cryptographically secure string identifiers. I
   would appreciate feedback on this algorithm, which I have seen used
   elsewhere (similar to what tomcat does to generate session ids); but
   not documented as a standard.

PR: Bugzilla 20013
Obtained from: Phil S.
Submitted by: Phil S.
Reviewed by: Tim O.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140838 13f79535-47bb-0310-9956-ffa450edef68
2003-05-18 00:58:52 +00:00
Tim O'Brien d6f7028269 Added a FixedDoubleArray. FixedDoubleArray supports a rolling mechanism
that reuses an array of fixed length.  This classes was added to an efficient
rolling mechanism.

FixedDoubleArray was influenced by discussions on the commons-dev list and
patches submitted by Mark Diggory.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140836 13f79535-47bb-0310-9956-ffa450edef68
2003-05-17 23:24:21 +00:00
Tim O'Brien 71dfdabde1 The Univariate interface now contains getWindow and setWindow in
addition to a constant which signifies an "infinite" window.  Windowing
has been added to all three Univariate implementations:

* UnivariateImpl - If the window is not infinite, we keep track of
0..n elements and discount the contribution of the discarded element when
our "window" is moved.  If the window is infinite no extra storage is used
beyond an empty ContractableDoubleArray.

- In the following two implementations, the window size can be changed at anytime.

* ListStoreUnivariateImpl - If the window is not infinite, this
implementation only takes into account the last n elements of the List.

* StoreUnivariateImpl - Uses an internal ContractableDoubleArray, window size
can be changed at any time.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140835 13f79535-47bb-0310-9956-ffa450edef68
2003-05-16 05:23:29 +00:00
Tim O'Brien 0700b0f482 * DoubleArray is now an interface which is implemented by
ExpandableDoubleArray.  The interface provides a public interface
which does not hint at any of the storage parameters of
Expandable or Contractable.

* DoubleArrayTest now operates on the DoubleArray interface, casting
to Expandable when we need to call the package scopes getInternalLength
method.

* While we should not provide access to the internal storage array, it
should be possible to obtain a double[] of elements stored in this
DoubleArray - double[] getElements() was added to the DoubleArray interface,
it will return the element array.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140834 13f79535-47bb-0310-9956-ffa450edef68
2003-05-16 04:23:06 +00:00
Tim O'Brien 7651a6b14d * ContractableDoubleArray extends ExpandableDoubleArray - I sense the
need for a DoubleArray interface.

* ExpandableDoubleArray and the extension ContractableDoubleArray should
aim towards presenting a public interface that does not expose any
details of the internal.  To this end, one is no longer able to get the
internal storage array via public double[] getValues(), and the startIndex
(which was relative to the internal storage array) is no longer available.

* [Expandable|Contractable]DoubleArray now allow one to discard
elements from the front of the array.  Before this commit, one could
accomplish the same goal by changing the starting index of the element
array within the internal storage array.  This solution allowed one to
discard elements from the front of the array (as well as) reclaiming
elements by decreases the startIndex.

There were two problems with this approach (especially in
ContractableDoubleArray).   The ContractableDoubleArray can be
"compacted" at anytime thereby reseting the startIndex to zero and the
size of the internal store array to number of elements plus one.  Second,
"reclaiming" elements from the internal storage array by finagling
internal "pointers" to the start and end index seems to violate the
principles of encapsulation.  If you "discard" an element from the
front of the array, consider it unavailable.

It should be noted that calling setNumElements allows one to move the end
index of the internal element array at will.  Assume one has a 100 element
array, and one calls setNumElements(10), thereby decreasing the ending index
of the element array by 90.  The 90 "dumped" elements are not currently
reinitializied to the default double primitive value.  This is an open
question.

* Tests for ExpandableDoubleArray and ContractableDoubleArray were
refactored.  both test classes now extend a DoubleArrayAbstractTest
JUnit class which contained shared unit tests for both "implementations".
An approach like this should be adopted to test the Univariate implementations.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140833 13f79535-47bb-0310-9956-ffa450edef68
2003-05-16 03:55:34 +00:00
Tim O'Brien 065a88e241 Patches from Phil S. applied:
* A TestStatistic interface with corresponding implementation and testcase

PR: Bugzilla 19971
Obtained from: Patches attached to issue
Submitted by: Phil S.
Reviewed by: Tim O/


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140832 13f79535-47bb-0310-9956-ffa450edef68
2003-05-15 21:58:23 +00:00
Tim O'Brien 5f2a1cbbc5 Made a nubmer of change to the ExpandableDoubleArray.
* This class now supports
the ability to move the starting index of the internal element array.  This
allows one to move the beginning of the element array, and form a sort of
"window", this will come into play when we want to provide moving
averages, or "rolling".

* Added an addElementRolling(double v) - this will increment the startIndex
and add the element to the end of the internal element array

* brought the Clover test cases up to 100% for this class

Added a class ContractableDoubleArray:

* This is an extension of ExpandableDoubleArray - it addes a configuration
parameter contractionCriteria.  Essential if the contractionCriteria is
2.0f we commit to never having the internal storage array provide more
than 2.0 times the storage capacity needed.  Once the internal
storage array exceed this measurement, the internal storage array is
pruned to the size of the internal element array.

Also, my IDE scolded me for some ununsed imports in ListUnivariateImpl, they
have been removed.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140831 13f79535-47bb-0310-9956-ffa450edef68
2003-05-15 15:38:48 +00:00
Tim O'Brien 5ae92f12c7 Another change to the stored Univariates. The calculations are now abstracted
into an AbstractStoreUnivariate class which take responsibility for
all statistical calculations.  AbstractStoreUnivariate is implemented by
two classes:

* StoreUnivariateImpl - This class uses a ExpandableDoubleArray for
internal storage.  This class is a more efficient class in terms
of storage and cycles for users who are interested in gathering statistics
not available in the UnivariateImpl implementation.

* ListUnivariateImpl - This class is for a situation where a user might
wish to maintain a List of numeric objects outside of a StoreUnivariate
instance.  We still need to add serious error checking in the absence of
1.5's generics, but this implementation will work with any list that
contains Number objects - (BigDecimal, BigInteger, Byte, Double, Float,
Integer, Long, Short).  This implementation ultimately transforms all
numeric objects into double primitives via Number.doubleValue().

Becuase AbstractStoreUnivariate does not hold on to any state, a user
can add values through the Univariate.addValue() function OR one can
directly manipulate the contents of the List directly.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140830 13f79535-47bb-0310-9956-ffa450edef68
2003-05-15 06:33:19 +00:00
Tim O'Brien 97568dc06f The following changes were made to the Univariate implementation. The public
interface of Univariate was extracted in an interface of the same name.
Univariate, an interface, is now implemented by UnivariateImpl which contains
all code originally present in the original Univariate implementation.

* StoredUnivariate is an interface which extends Univariate and adds
measures not available in the superinterface such as mode, kurtosis, and skew

* StoredUnivariateImpl provides an implementation which uses the
ExpandableDoubleArray for internal storage.  Calculations are performed
on demand *each* time a particular measure is required no state is
maintained by this implementation.

* Univariate provided methods addValue(int), addValue(float), addValue(long).
There functions were removed as no cast is required - all of these
assignments are widening conversions - no cast required

* Removed the name property from Univariate - property not relevant to
univariate statistics


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140828 13f79535-47bb-0310-9956-ffa450edef68
2003-05-15 05:39:01 +00:00
Tim O'Brien f039b677b8 Added an expandable double array, this class simply contains a double[] and takes care of automatic expansion of an internal array when necessary. Class added with accompanying unit test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140827 13f79535-47bb-0310-9956-ffa450edef68
2003-05-15 05:19:57 +00:00
Tim O'Brien ccf6befd5f 1. Make RealMatrixImpl implement Serializable
2. Make all currently unimplemented methods throw UnsupportedOperationException
3. Add solve() method to RealMatrix interface, representing vector
   solution to AX = B, where B is the parameter and A is *this.

Phil

Obtained from: Phil S.
Submitted by: Phil S.
Reviewed by: Tim O.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140826 13f79535-47bb-0310-9956-ffa450edef68
2003-05-13 19:08:14 +00:00
Robert Burrell Donkin e4694325bc Starting source code - basic matrix operations and univarient stats plus test code. Submitted by Phil Steitz.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140823 13f79535-47bb-0310-9956-ffa450edef68
2003-05-12 19:04:38 +00:00
Robert Burrell Donkin 925847780e added new commons math component
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140822 13f79535-47bb-0310-9956-ffa450edef68
2003-05-12 15:07:54 +00:00