Recovering Tree

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark R. Diggory 2003-11-14 21:46:30 +00:00
parent e389289e77
commit a58c503cf5
9 changed files with 655 additions and 0 deletions

53
LICENSE.txt Normal file
View File

@ -0,0 +1,53 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/

96
PROPOSAL.html Normal file
View File

@ -0,0 +1,96 @@
<html>
<head>
<title>Proposal for math Package</title>
</head>
<body bgcolor="white">
<div align="center">
<h1>Proposal for <em>math</em> Package</h1>
</div>
<h3>(0) Rationale</h3>
<p>The Java programming language and the math extensions in commons-lang provide implementations for only the most basic mathematical algorithms. Routine development tasks such as computing basic statistics or solving a system of linear equations require components not available in java or commons-lang.</p>
<p>Most basic mathematical or statistical algorithms are available in open source implementations, but to assemble a simple set of capabilities one has to use multiple libraries, many of which have more restrictive licensing terms than the ASF. In addition, many of the best open source implementations (e.g. the R statistical package) are either not available in Java or require large support libraries and/or external dependencies to work.</p>
<p>A commons-math community will provide a productive environment for aggregation, testing and support of efficient Java implementations of commonly used mathematical and statistical algorithms.</p>
</p>
<h3>(1) Scope of the Package</h3>
<p>The Math project shall create and maintain a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang. The guiding principles for commons-math will be:
<ol>
<li>Real-world application use cases determine priority</li>
<li>Emphasis on small, easily integrated components rather than large libraries with complex dependencies</li>
<li>All algorithms are fully documented and follow generally accepted best practices</li>
<li>In situations where multiple standard algorithms exist, use the Strategy pattern to support multiple implementations</li>
<li>Limited dependencies. No external dependencies beyond Commons components and the JDK</li>
</ol>
<h3>(1.5) Interaction With Other Packages</h3>
<p><em>math</em> relies only on standard JDK 1.2 (or later) APIs for
production deployment. It utilizes the JUnit unit testing framework for
developing and executing unit tests, but this is of interest only to
developers of the component.</p>
<p>No external configuration files are utilized.</p>
<h3>(2) Initial Source of the Package</h3>
<p>The initial codebase will consist of implementations of basic statistical algorithms such as the following:
<ul>
<li>Simple univariate statistics (mean, standard deviation, n, confidence intervals)</li>
<li>Frequency distributions</li>
<li>t-test, chi-square test</li>
<li>Random numbers from Gaussian, Exponential, Poisson distributions</li>
<li>Random sampling/resampling</li>
<li>Bivariate regression, corellation</li>
</ul>
and mathematical algorithms such as the following:
<ul>
<li>Basic Complex Number representation with algebraic operations</li>
<li>Newton's method for finding roots</li>
<li>Binomial coefficients</li>
<li>Exponential growth and decay (set up for financial applications)</li>
<li>Polynomial Interpolation (curve fitting)</li>
<li>Basic Matrix representation with algebraic operations</li>
</ul>
</p>
<p>The proposed package name for the new component is
<code>org.apache.commons.math</code>.</p>
<h3>(3) Required Jakarta-Commons Resources</h3>
<ul>
<li>CVS Repository - New directory <code>math</code> in the
<code>jakarta-commons</code> CVS repository.</li>
<li>Mailing List - Discussions will take place on the general
<em>commons-dev@jakarta.apache.org</em> mailing list. To help
list subscribers identify messages of interest, it is suggested that
the message subject of messages about this component be prefixed with
[math].</li>
<li>Bugzilla - New component "math" under the "Commons" product
category, with appropriate version identifiers as needed.</li>
<li>Jyve FAQ - New category "commons-math" (when available).</li>
</ul>
<h3>(4) Initial Committers</h3>
<p>The initial committers on the math component shall be:
<ul>
<li><a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a></li>
<li><a href="mailto:tobrien@apache.org">Tim O'Brien</a></li>
</ul>
</p>
</body>
</html>

23
RELEASE-NOTES.txt Normal file
View File

@ -0,0 +1,23 @@
$Id: RELEASE-NOTES.txt,v 1.3 2003/11/14 21:46:30 mdiggory Exp $
Commons math Package
Version 1.0-dev
Release Notes
INTRODUCTION:
This document contains the release notes for this version of the Commons
math package, and highlights changes since the previous version. The
current release adds new features and bug fixes, and is being done now to
follow the release early/release often mentality.
NEW FEATURES:
*
BUG FIXES:

107
STATUS.html Normal file
View File

@ -0,0 +1,107 @@
<html>
<head>
<title>Status File for Jakarta Commons "math" Component</title>
</head>
<body bgcolor="white">
<div align="center">
<h1>The Jakarta Commons <em>math</em> Component</h1>
$Id: STATUS.html,v 1.5 2003/11/14 21:46:30 mdiggory Exp $<br />
<a href="#Introduction">[Introduction]</a>
<a href="#Dependencies">[Dependencies]</a>
<a href="#Release Info">[Release Info]</a>
<a href="#Committers">[Committers]</a>
<a href="#Action Items">[Action Items]</a>
<br /><br />
</div>
<a name="Introduction"></a>
<h3>1. INTRODUCTION</h3>
<p>The Math project is a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang. The guiding principles for commons-math are:
<ol>
<li>Real-world application use cases determine priority</li>
<li>Emphasis on small, easily integrated components rather than large libraries with complex dependencies</li>
<li>All algorithms are fully documented and follow generally accepted best practices</li>
<li>In situations where multiple standard algorithms exist, use the Strategy pattern to support multiple implementations</li>
<li>Limited dependencies. No external dependencies beyond Commons components and the JDK</li>
</ol>
<a name="Dependencies"></a>
<h3>2. DEPENDENCIES</h3>
<p>The <em>math</em> component is dependent upon the following external
components for development and use:</p>
<ul>
<li><a href="http://java.sun.com/j2se">Java Development Kit</a>
(Version 1.2 or later)</li>
<li><a href="http://www.junit.org">JUnit Testing Framework</a>
(Version 3.7 or later) - for unit tests only, not required
for deployment</li>
</ul>
<a name="Release Info"></a>
<h3>3. RELEASE INFO</h3>
<p>Math is really still at the prototyping stage.</p>
<a name="Committers"></a>
<h3>4. COMMITTERS</h3>
<p>The following individuals are the primary developers and maintainers of this
component. Developers who plan to use <em>math</em> in their own
projects are encouraged to collaborate on the future development of this
component to ensure that it continues to meet a variety of needs.</p>
<ul>
<li><a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a></li>
<li><a href="mailto:tobrien@apache.org">Tim O'Brien</a></li>
</ul>
<a name="Action Items"></a>
<h3>5. ACTION ITEMS</h3>
<p>The following action items need to be completed prior to a Version 1.0
release of this component:</p>
<table border="1">
<tr>
<th width="80%">Action Item</th>
<th width="20%">Volunteer</th>
</tr>
<tr>
<td>Get basic web site operational</td>
<td align="center">Everyone</td>
</tr>
<tr>
<td>Document NaN and all error semantics for Univariate and Freq</td>
<td align="center">Everyone</td>
</tr>
<tr>
<td>Document and implement rolling mean extension of Univariate</td>
<td align="center">Everyone</td>
</tr>
<tr>
<td>Research numerical optimization of all Univariate, RealMatrix operations</td>
<td align="center">Everyone</td>
</tr>
<tr>
<td>Complete RealMatrixImpl implementation</td>
<td align="center">Everyone</td>
</tr>
<tr>
<td>Prioritize remaining items in proposal and finalize scope for 1.0</td>
<td align="center">Everyone</td>
</tr>
</table>
</body>
</html>

175
build.xml Normal file
View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
build.xml generated by maven from project.xml version 0.1-dev
on date September 27 2003, time 0007
-->
<project default="jar" name="commons-math" basedir=".">
<property name="defaulttargetdir" value="target">
</property>
<property name="libdir" value="target/lib">
</property>
<property name="classesdir" value="target/classes">
</property>
<property name="testclassesdir" value="target/test-classes">
</property>
<property name="testreportdir" value="target/test-reports">
</property>
<property name="distdir" value="dist">
</property>
<property name="javadocdir" value="dist/docs/api">
</property>
<property name="final.name" value="commons-math-0.1-dev">
</property>
<target name="init" description="o Initializes some properties">
<mkdir dir="${libdir}">
</mkdir>
<condition property="noget">
<equals arg2="only" arg1="${build.sysclasspath}">
</equals>
</condition>
</target>
<target name="compile" description="o Compile the code" depends="get-deps">
<mkdir dir="${classesdir}">
</mkdir>
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="src/java">
</pathelement>
</src>
<classpath>
<fileset dir="${libdir}">
<include name="*.jar">
</include>
</fileset>
</classpath>
</javac>
<copy todir="${testclassesdir}">
<fileset dir="src/test">
<include name="**/*.xml">
</include>
<include name="**/*.txt">
</include>
</fileset>
</copy>
</target>
<target name="jar" description="o Create the jar" depends="compile,test">
<jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
</jar>
</target>
<target name="clean" description="o Clean up the generated directories">
<delete dir="${defaulttargetdir}">
</delete>
<delete dir="${distdir}">
</delete>
</target>
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
<mkdir dir="dist">
</mkdir>
<copy todir="dist">
<fileset dir="${defaulttargetdir}" includes="*.jar">
</fileset>
<fileset dir="${basedir}" includes="LICENSE*, README*">
</fileset>
</copy>
</target>
<target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
<fail message="There were test failures.">
</fail>
</target>
<target name="internal-test" depends="compile-tests">
<mkdir dir="${testreportdir}">
</mkdir>
<junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
<sysproperty key="basedir" value=".">
</sysproperty>
<formatter type="xml">
</formatter>
<formatter usefile="false" type="plain">
</formatter>
<classpath>
<fileset dir="${libdir}">
<include name="*.jar">
</include>
</fileset>
<pathelement path="${testclassesdir}">
</pathelement>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
<batchtest todir="${testreportdir}">
<fileset dir="src/test">
<include name="**/*Test.java">
</include>
<exclude name="**/*AbstractTest.java">
</exclude>
</fileset>
</batchtest>
</junit>
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${testclassesdir}">
</mkdir>
<javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="src/test">
</pathelement>
</src>
<classpath>
<fileset dir="${libdir}">
<include name="*.jar">
</include>
</fileset>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
</javac>
</target>
<target name="javadoc" description="o Generate javadoc" depends="jar">
<mkdir dir="${javadocdir}">
</mkdir>
<tstamp>
<format pattern="2003-yyyy" property="year">
</format>
</tstamp>
<property name="copyright" value="Copyright &amp;copy; Apache Software Foundation. All Rights Reserved.">
</property>
<property name="title" value="Math 0.1-dev API">
</property>
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.*.*">
<classpath>
<fileset dir="${libdir}">
<include name="*.jar">
</include>
</fileset>
<pathelement location="target/${final.name}.jar">
</pathelement>
</classpath>
</javadoc>
</target>
<target name="get-deps" unless="noget" depends="init">
<get dest="${libdir}/commons-beanutils-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.5.jar">
</get>
<get dest="${libdir}/commons-collections-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-SNAPSHOT.jar">
</get>
<get dest="${libdir}/commons-lang-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-SNAPSHOT.jar">
</get>
<get dest="${libdir}/commons-logging-1.0.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar">
</get>
<get dest="${libdir}/commons-discovery-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-discovery/jars/commons-discovery-SNAPSHOT.jar">
</get>
<get dest="${libdir}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar">
</get>
<get dest="${libdir}/ant-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar">
</get>
<get dest="${libdir}/ant-optional-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-optional-1.5.jar">
</get>
</target>
<target name="install-maven">
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
</get>
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
</unjar>
</target>
</project>

20
checkstyle.properties Normal file
View File

@ -0,0 +1,20 @@
# commons math customization of default Checkstyle behavior
# Verify that EVERY source file has the appropriate license
checkstyle.header.file=LICENSE.txt
# 2-5 = CVS Header in Commons license, 10 = copyright date, 32 = product name
#checkstyle.header.ignoreline=2,3,4,5,10,32
# Ignore operator wrap, this has the effect of allowing
# operators to appear at both the eol and the nl. This
# setting should be eol, but checkstyle had problems
# parsing this property when set to "eol". "ignore"
# was selected as a fallback.
checkstyle.wrap.operator = ignore
# Ignore padding around parenthese, this allows for both
# foo(a,b), and foo( a, b ).
checkstyle.paren.pad = ignore
# One should not be instantiating a java.lang.Boolean
checkstyle.illegal.instantiations = java.lang.Boolean

31
checkstyle.xml Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
<!-- commons math customization of default Checkstyle behavior -->
<module name="Checker">
<property name="basedir" value="src/checkstyle"/>
<property name="localeLanguage" value="en"/>
<module name="TreeWalker">
<!-- Verify that EVERY source file has the appropriate license -->
<module name="Header">
<property name="headerFile" value="LICENSE.txt"/>
</module>
<module name="OperatorWrap">
<property name="option" value="eol"/>
</module>
<module name="JavadocType">
<property name="versionFormat" value="\$Revision.*\$ \$Date.*\$"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
</module>
<module name="JavadocVariable"/>
</module>
</module>

17
project.properties Normal file
View File

@ -0,0 +1,17 @@
##
# Properties that override Maven build defaults
##
maven.checkstyle.properties=${basedir}/checkstyle.xml
maven.test.failure = false
maven.junit.fork=true
#maven.linkcheck.enable=true
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}
maven.xdoc.developmentProcessUrl=http://jakarta.apache.org/commons/charter.html
maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/,\
http://jakarta.apache.org/commons/collections/api/,\
http://jakarta.apache.org/commons/beanutils/api/,\
http://jakarta.apache.org/commons/logging/api/

133
project.xml Normal file
View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision: 1.28 $ $Date: 2003/11/14 21:46:30 $ -->
<project>
<extend>../../jakarta-commons/project.xml</extend>
<name>Math</name>
<id>commons-math</id>
<currentVersion>0.1-dev</currentVersion>
<inceptionYear>2003</inceptionYear>
<logo/>
<shortDescription>
A library of lightweight, self-contained mathematics and statistics components.
</shortDescription>
<description>
The Math project is a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang.
</description>
<siteDirectory>/www/jakarta.apache.org/commons/sandbox/math/</siteDirectory>
<versions>
<version>
<id>0.1-dev</id>
<name>0.1-dev</name>
</version>
</versions>
<developers>
<developer>
<name>Robert Burrell Donkin</name>
<id>rdonkin</id>
<email>rdonkin@apache.org</email>
</developer>
<developer>
<name>Tim OBrien</name>
<id>tobrien</id>
<email>tobrien@apache.org</email>
</developer>
<developer>
<name>Mark R. Diggory</name>
<id>mdiggory</id>
<email>mdiggory@apache.org</email>
</developer>
</developers>
<contributors>
<contributor>
<name>Phil Steitz</name>
<email>phil@steitz.com</email>
<roles>
<role>proposal author</role>
<role>initial contributor</role>
</roles>
</contributor>
<contributor>
<name>Brent Worden</name>
<email>brent@worden.org</email>
</contributor>
<contributor>
<name>Albert Davidson Chou</name>
<email>hotfusionman@yahoo.com</email>
</contributor>
<contributor>
<name>J.Pietschmann</name>
<email>j3322ptm@yahoo.de</email>
</contributor>
</contributors>
<dependencies>
<dependency>
<id>commons-beanutils</id>
<version>1.5</version>
</dependency>
<dependency>
<id>commons-collections</id>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<id>commons-lang</id>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<id>commons-logging</id>
<version>1.0.3</version>
</dependency>
<dependency>
<id>commons-discovery</id>
<version>SNAPSHOT</version>
</dependency>
</dependencies>
<issueTrackingUrl>http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=Commons&amp;component=Sandbox&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;bug_file_loc=&amp;bug_file_loc_type=allwordssubstr&amp;keywords=&amp;keywords_type=anywords&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;order=%27Importance%27</issueTrackingUrl>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-commons-sandbox/${pom.artifactId.substring(8)}</connection>
<url>http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/${pom.artifactId.substring(8)}/</url>
</repository>
<build>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*AbstractTest.java</exclude>
</excludes>
<resources>
<resource>
<directory>${pom.build.unitTestSourceDirectory}</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.txt</include>
</includes>
</resource>
</resources>
</unitTest>
</build>
<reports>
<report>maven-changelog-plugin</report>
<report>maven-changes-plugin</report>
<report>maven-checkstyle-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-javadoc-plugin</report>
<report>maven-jdepend-plugin</report>
<report>maven-junit-report-plugin</report>
<report>maven-jxr-plugin</report>
<report>maven-license-plugin</report>
<report>maven-statcvs-plugin</report>
<report>maven-tasklist-plugin</report>
<!--
<report>maven-clover-plugin</report>
<report>maven-linkcheck-plugin</report>
-->
</reports>
</project>