Fixed javadoc, checkstyle, and link warnings. Made some corrections and additions to the user guide.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141331 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brent Worden 2004-06-23 16:26:18 +00:00
parent 8d1b142b00
commit c28fd51e88
102 changed files with 1907 additions and 1859 deletions

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

View File

@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Revision: 1.46 $ $Date: 2004/06/20 16:54:01 $ -->
<!-- $Revision: 1.47 $ $Date: 2004/06/23 16:26:17 $ -->
<project>
<pomVersion>3</pomVersion>
@ -168,7 +168,6 @@
<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-linkcheck-plugin</report>
</reports>

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,8 +20,8 @@ import java.io.Serializable;
/**
* Error thrown when a numerical computation can not be performed because the
* numerical result failed to converge to a finite value.
*
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:05:28 $
*
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:16 $
*/
public class ConvergenceException extends MathException implements Serializable{

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Signals a configuration problem with any of the factory methods.
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:05:28 $
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:16 $
*/
public class MathConfigurationException extends MathException implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,7 +21,7 @@ import org.apache.commons.lang.exception.NestableException;
/**
* A generic exception indicating problems in the math package.
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:05:28 $
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:16 $
*/
public class MathException extends NestableException implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,7 +23,7 @@ import org.apache.commons.math.MathException;
* Implements the <a href="http://mathworld.wolfram.com/Bisection.html">bisection algorithm</a>
* for finding zeros of univariate real functions. This algorithm will find only one zero in the given interval.
* The function should be continuous but not necessarily smooth.
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:11:08 $
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:14 $
*/
public class BisectionSolver extends UnivariateRealSolverImpl implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -25,7 +25,7 @@ import org.apache.commons.math.MathException;
* functions. This algorithm will find only one zero in the given interval.
* The function should be continuous but not necessarily smooth.
*
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:11:08 $
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:14 $
*/
public class BrentSolver extends UnivariateRealSolverImpl implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -18,7 +18,7 @@ package org.apache.commons.math.analysis;
/**
* Extension of {@link UnivariateRealFunction} representing a differentiable univariate real function.
*
* @version $Revision: 1.1 $ $Date: 2004/04/02 20:59:52 $
* @version $Revision: 1.2 $ $Date: 2004/06/23 16:26:14 $
*/
public interface DifferentiableUnivariateRealFunction
extends UnivariateRealFunction {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -26,7 +26,7 @@ import org.apache.commons.math.MathException;
* algorithm will find only one zero in the given interval. The function should
* be continuous but not necessarily smooth.
*
* @version $Revision: 1.4 $ $Date: 2004/06/02 00:11:08 $
* @version $Revision: 1.5 $ $Date: 2004/06/23 16:26:14 $
*/
public class NewtonSolver extends UnivariateRealSolverImpl implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,8 +22,8 @@ import java.io.Serializable;
* <p>
* <a href="http://mathworld.wolfram.com/HornersMethod.html">Horner's Method</a>
* is used to evaluate the function.
*
* @version $Revision: 1.10 $ $Date: 2004/06/02 00:11:08 $
*
* @version $Revision: 1.11 $ $Date: 2004/06/23 16:26:14 $
*/
public class PolynomialFunction implements DifferentiableUnivariateRealFunction, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -40,8 +40,8 @@ import org.apache.commons.math.MathException;
* <code>IllegalArgumentException</code> is thrown.</li>
* <li> Let <code>j</code> be the index of the largest knot point that is less than or equal to <code>x</code>.
* The value returned is <br> <code>polynomials[j](x - knot[j])</code></li></ol>
*
* @version $Revision: 1.5 $ $Date: 2004/06/02 00:11:08 $
*
* @version $Revision: 1.6 $ $Date: 2004/06/23 16:26:14 $
*/
public class PolynomialSplineFunction implements UnivariateRealFunction, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ import org.apache.commons.math.MathException;
* <p>
* The function is supposed to be continuous but not necessarily smooth.
*
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:11:08 $
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:14 $
*/
public class SecantSolver extends UnivariateRealSolverImpl implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -37,7 +37,7 @@ package org.apache.commons.math.analysis;
* The cubic spline interpolation algorithm implemented is as described in R.L. Burden, J.D. Faires,
* <u>Numerical Analysis</u>, 4th Ed., 1989, PWS-Kent, ISBN 0-53491-585-X, pp 126-131.
*
* @version $Revision: 1.18 $ $Date: 2004/06/02 00:10:45 $
* @version $Revision: 1.19 $ $Date: 2004/06/23 16:26:14 $
*
*/
public class SplineInterpolator implements UnivariateRealInterpolator {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ import org.apache.commons.math.MathException;
/**
* An interface representing a univariate real function.
*
* @version $Revision: 1.12 $ $Date: 2004/02/21 21:35:14 $
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:14 $
*/
public interface UnivariateRealFunction {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ import org.apache.commons.math.MathException;
/**
* Interface representing a univariate real interpolating function.
*
* @version $Revision: 1.10 $ $Date: 2004/02/21 21:35:14 $
* @version $Revision: 1.11 $ $Date: 2004/06/23 16:26:14 $
*/
public interface UnivariateRealInterpolator {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,7 +22,7 @@ import org.apache.commons.math.MathException;
* <p>
* Implementations will search for only one zero in the given interval.
*
* @version $Revision: 1.12 $ $Date: 2004/05/21 14:21:42 $
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:14 $
*/
public interface UnivariateRealSolver {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,17 +31,17 @@ import org.apache.commons.discovery.tools.DiscoverClass;
* <p>
* Common usage:<pre>
* SolverFactory factory = UnivariateRealSolverFactory.newInstance();
*
*
* // create a Brent solver to use with a UnivariateRealFunction f
* BrentSolver solver = factory.newBrentSolver(f);
* </pre>
*
*
* <a href="http://jakarta.apache.org/commons/discovery/">Jakarta Commons Discovery</a>
* is used to determine the concrete factory returned by
* <code>UnivariateRealSolverFactory.newInstance().</code> The default is
* {@link UnivariateRealSolverFactoryImpl}.
*
* @version $Revision: 1.14 $ $Date: 2004/04/08 21:19:17 $
*
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:14 $
*/
public abstract class UnivariateRealSolverFactory {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,8 +20,8 @@ package org.apache.commons.math.analysis;
* used by commons-math.
* <p>
* The default solver returned by this factory is a {@link BrentSolver}.
*
* @version $Revision: 1.12 $ $Date: 2004/06/02 00:10:45 $
*
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:14 $
*/
public class UnivariateRealSolverFactoryImpl extends UnivariateRealSolverFactory {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,10 +24,11 @@ import org.apache.commons.math.MathException;
* Provide a default implementation for several functions useful to generic
* solvers.
*
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:11:08 $
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:14 $
*/
public abstract class UnivariateRealSolverImpl implements UnivariateRealSolver, Serializable {
/** Serializable version identifier */
static final long serialVersionUID = 1112491292565386596L;
/** Maximum absolute error. */

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ import org.apache.commons.math.MathException;
/**
* Utility routines for {@link UnivariateRealSolver} objects.
* @version $Revision: 1.8 $ $Date: 2004/04/08 21:19:17 $
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:14 $
*/
public class UnivariateRealSolverUtils {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,9 +21,9 @@ import java.io.Serializable;
/**
* Representation of a Complex number - a number which has both a
* real and imaginary part.
*
*
* @author Apache Software Foundation
* @version $Revision: 1.8 $ $Date: 2004/06/02 00:07:01 $
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:16 $
*/
public class Complex implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -29,7 +29,7 @@ import java.text.ParsePosition;
* can be configured.
*
* @author Apache Software Foundation
* @version $Revision: 1.8 $ $Date: 2004/06/02 00:07:01 $
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:16 $
*/
public class ComplexFormat extends Format implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,14 +21,14 @@ import org.apache.commons.math.util.MathUtils;
/**
* Implementations of various transcendental functions for
* {@link org.apache.commons.math.complex.Complex} arguments.
*
*
* Reference:
* <ul>
* <li><a href="http://myweb.lmu.edu/dmsmith/ZMLIB.pdf">
* Multiple Precision Complex Arithmetic and Functions</a></li>
* </ul>
*
* @version $Revision: 1.8 $ $Date: 2004/04/23 18:51:03 $
*
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:16 $
*/
public class ComplexMath {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -26,11 +26,12 @@ import org.apache.commons.math.analysis.UnivariateRealSolverUtils;
* implementations for some of the methods that do not vary from distribution
* to distribution.
*
* @version $Revision: 1.23 $ $Date: 2004/06/02 00:15:16 $
* @version $Revision: 1.24 $ $Date: 2004/06/23 16:26:15 $
*/
public abstract class AbstractContinuousDistribution
implements ContinuousDistribution, Serializable {
/** Serializable version identifier */
static final long serialVersionUID = -38038050983108802L;
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -25,11 +25,12 @@ import org.apache.commons.math.MathException;
* implementations for some of the methods that do not vary from distribution
* to distribution.
*
* @version $Revision: 1.16 $ $Date: 2004/06/02 00:15:16 $
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:15 $
*/
public abstract class AbstractDiscreteDistribution
implements DiscreteDistribution, Serializable {
/** Serializable version identifier */
static final long serialVersionUID = -1146319659338487221L;
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ package org.apache.commons.math.distribution;
*
* Instances of BinomialDistribution objects should be created using
* {@link DistributionFactory#createBinomialDistribution(int, double)}.
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Binomial Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.10 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.11 $ $Date: 2004/06/23 16:26:15 $
*/
public interface BinomialDistribution extends DiscreteDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import org.apache.commons.math.util.MathUtils;
/**
* The default implementation of {@link BinomialDistribution}.
*
* @version $Revision: 1.15 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:15 $
*/
public class BinomialDistributionImpl
extends AbstractDiscreteDistribution

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,10 +17,10 @@ package org.apache.commons.math.distribution;
/**
* The Chi-Squared Distribution.
*
*
* Instances of ChiSquaredDistribution objects should be created using
* {@link DistributionFactory#createChiSquareDistribution(double)}.
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Chi-Squared Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.13 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:15 $
*/
public interface ChiSquaredDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,8 +21,8 @@ import org.apache.commons.math.MathException;
/**
* The default implementation of {@link ChiSquaredDistribution}
*
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:15 $
*/
public class ChiSquaredDistributionImpl
extends AbstractContinuousDistribution

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,8 +19,8 @@ import org.apache.commons.math.MathException;
/**
* Base interface for various continuous distributions.
*
* @version $Revision: 1.14 $ $Date: 2004/05/19 14:16:31 $
*
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public interface ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,8 +19,8 @@ import org.apache.commons.math.MathException;
/**
* Base interface for various discrete distributions.
*
* @version $Revision: 1.14 $ $Date: 2004/05/19 14:16:31 $
*
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public interface DiscreteDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,15 +31,15 @@ import org.apache.commons.discovery.tools.DiscoverClass;
* <li>Normal</li>
* <li>Student's t</li>
* </ul>
*
*
* Common usage:<pre>
* DistributionFactory factory = DistributionFactory.newInstance();
*
*
* // create a Chi-Square distribution with 5 degrees of freedom.
* ChiSquaredDistribution chi = factory.createChiSquareDistribution(5.0);
* </pre>
*
* @version $Revision: 1.19 $ $Date: 2004/02/21 21:35:14 $
*
* @version $Revision: 1.20 $ $Date: 2004/06/23 16:26:15 $
*/
public abstract class DistributionFactory {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ package org.apache.commons.math.distribution;
* A concrete distribution factory. This is the default factory used by
* Commons-Math.
*
* @version $Revision: 1.19 $ $Date: 2004/06/02 00:14:15 $
* @version $Revision: 1.20 $ $Date: 2004/06/23 16:26:15 $
*/
public class DistributionFactoryImpl extends DistributionFactory {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,10 +17,10 @@ package org.apache.commons.math.distribution;
/**
* The Exponential Distribution.
*
*
* Instances of ExponentialDistribution objects should be created using
* {@link DistributionFactory#createExponentialDistribution(double)}.
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Exponential Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.11 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.12 $ $Date: 2004/06/23 16:26:15 $
*/
public interface ExponentialDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,8 +21,8 @@ import org.apache.commons.math.MathException;
/**
* The default implementation of {@link ExponentialDistribution}
*
* @version $Revision: 1.17 $ $Date: 2004/06/06 16:38:05 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:15 $
*/
public class ExponentialDistributionImpl extends AbstractContinuousDistribution
implements ExponentialDistribution, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,10 +17,10 @@ package org.apache.commons.math.distribution;
/**
* F-Distribution.
*
*
* Instances of FDistribution objects should be created using
* {@link DistributionFactory#createFDistribution(double,double)}.
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* F-Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.12 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:15 $
*/
public interface FDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import org.apache.commons.math.special.Beta;
/**
* Default implementation of
* {@link org.apache.commons.math.distribution.FDistribution}.
*
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:15 $
*/
public class FDistributionImpl
extends AbstractContinuousDistribution

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,10 +17,10 @@ package org.apache.commons.math.distribution;
/**
* The Gamma Distribution.
*
*
* Instances of GammaDistribution objects should be created using
* {@link DistributionFactory#createGammaDistribution(double,double)}.
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Gamma Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.14 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public interface GammaDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,8 +22,8 @@ import org.apache.commons.math.special.Gamma;
/**
* The default implementation of {@link GammaDistribution}
*
* @version $Revision: 1.20 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.21 $ $Date: 2004/06/23 16:26:15 $
*/
public class GammaDistributionImpl extends AbstractContinuousDistribution
implements GammaDistribution, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -18,10 +18,10 @@ package org.apache.commons.math.distribution;
/**
* The Hypergeometric Distribution.
*
*
* Instances of HypergeometricDistribution objects should be created using
* {@link DistributionFactory#createHypergeometricDistribution(int, int, int)}.
*
*
* <p>
* References:
* <ul>
@ -29,8 +29,8 @@ package org.apache.commons.math.distribution;
* Hypergeometric Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.9 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.10 $ $Date: 2004/06/23 16:26:15 $
*/
public interface HypergeometricDistribution extends DiscreteDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import org.apache.commons.math.util.MathUtils;
/**
* The default implementation of {@link HypergeometricDistribution}.
*
* @version $Revision: 1.14 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public class HypergeometricDistributionImpl extends AbstractDiscreteDistribution
implements HypergeometricDistribution, Serializable

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ package org.apache.commons.math.distribution;
* Normal (Gauss) Distribution.
* Instances of NormalDistribution objects should be created using
* {@link DistributionFactory#createNormalDistribution(double, double)}.<p>
*
*
* <p>
* References:<p>
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Normal Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.7 $ $Date: 2004/05/05 19:59:11 $
*
* @version $Revision: 1.8 $ $Date: 2004/06/23 16:26:15 $
*/
public interface NormalDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,8 +24,8 @@ import org.apache.commons.math.special.Erf;
/**
* Default implementation of
* {@link org.apache.commons.math.distribution.NormalDistribution}.
*
* @version $Revision: 1.11 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.12 $ $Date: 2004/06/23 16:26:15 $
*/
public class NormalDistributionImpl extends AbstractContinuousDistribution
implements NormalDistribution, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,10 +17,10 @@ package org.apache.commons.math.distribution;
/**
* Student's t-Distribution.
*
*
* Instances of TDistribution objects should be created using
* {@link DistributionFactory#createTDistribution(double)}
*
*
* <p>
* References:
* <ul>
@ -28,8 +28,8 @@ package org.apache.commons.math.distribution;
* Student's t-Distribution</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.11 $ $Date: 2004/04/26 19:15:48 $
*
* @version $Revision: 1.12 $ $Date: 2004/06/23 16:26:15 $
*/
public interface TDistribution extends ContinuousDistribution {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import org.apache.commons.math.special.Beta;
/**
* Default implementation of
* {@link org.apache.commons.math.distribution.TDistribution}.
*
* @version $Revision: 1.17 $ $Date: 2004/06/02 00:15:16 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:15 $
*/
public class TDistributionImpl
extends AbstractContinuousDistribution

View File

@ -1,327 +1,327 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math.linear;
import java.math.BigDecimal;
/**
* Interface defining a real-valued matrix with basic algebraic operations, using
* BigDecimal representations for the entries.
*
* @version $Revision: 1.2 $ $Date: 2004/06/06 16:08:52 $
*/
public interface BigMatrix {
/**
* Returns a (deep) copy of this.
*
* @return matrix copy
*/
BigMatrix copy();
/**
* Compute the sum of this and m.
*
* @param m matrix to be added
* @return this + m
* @exception IllegalArgumentException if m is not the same size as this
*/
BigMatrix add(BigMatrix m) throws IllegalArgumentException;
/**
* Compute this minus m.
*
* @param m matrix to be subtracted
* @return this + m
* @exception IllegalArgumentException if m is not the same size as this
*/
BigMatrix subtract(BigMatrix m) throws IllegalArgumentException;
/**
* Returns the result of adding d to each entry of this.
*
* @param d value to be added to each entry
* @return d + this
*/
BigMatrix scalarAdd(BigDecimal d);
/**
* Returns the result multiplying each entry of this by d.
*
* @param d value to multiply all entries by
* @return d * this
*/
BigMatrix scalarMultiply(BigDecimal d);
/**
* Returns the result postmultiplying this by m.
*
* @param m matrix to postmultiply by
* @return this * m
* @throws IllegalArgumentException
* if columnDimension(this) != rowDimension(m)
*/
BigMatrix multiply(BigMatrix m) throws IllegalArgumentException;
/**
* Returns the result premultiplying this by <code>m</code>.
* @param m matrix to premultiply by
* @return m * this
* @throws IllegalArgumentException
* if rowDimension(this) != columnDimension(m)
*/
public BigMatrix preMultiply(BigMatrix m) throws IllegalArgumentException;
/**
* Returns matrix entries as a two-dimensional array.
*
* @return 2-dimensional array of entries
*/
BigDecimal[][] getData();
/**
* Returns matrix entries as a two-dimensional array.
*
* @return 2-dimensional array of entries
*/
double [][] getDataAsDoubleArray();
/**
* Overwrites the underlying data for the matrix with
* a fresh copy of <code>data</code>.
*
* @param data 2-dimensional array of entries
*/
void setData(BigDecimal[][] data);
/**
* Overwrites the underlying data for the matrix with
* a fresh copy of <code>data</code>.
*
* @param data 2-dimensional array of entries
*/
void setData(double[][] data);
/***
* Sets the rounding mode to use when dividing values
* @see java.math.BigDecimal
* @param roundingMode
*/
void setRoundingMode(int roundingMode);
/***
* Gets the rounding mode
* @return
*/
int getRoundingMode();
/**
* Returns the <a href="http://mathworld.wolfram.com/MaximumAbsoluteRowSumNorm.html">
* maximum absolute row sum norm</a> of the matrix.
*
* @return norm
*/
BigDecimal getNorm();
/**
* Returns the entries in row number <code>row</code> as an array.
*
* @param row the row to be fetched
* @return array of entries in the row
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified row is greater
* than the number of rows in this matrix
*/
BigDecimal[] getRow(int row) throws MatrixIndexException;
/**
* Returns the entries in row number <code>row</code> as an array
* of double values.
*
* @param row the row to be fetched
* @return array of entries in the row
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified row is greater
* than the number of rows in this matrix
*/
double [] getRowAsDoubleArray(int row) throws MatrixIndexException;
/**
* Returns the entries in column number <code>col</code> as an array.
*
* @param col column to fetch
* @return array of entries in the column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified column is greater
* than the number of columns in this matrix
*/
BigDecimal[] getColumn(int col) throws MatrixIndexException;
/**
* Returns the entries in column number <code>col</code> as an array
* of double values.
*
* @param col column to fetch
* @return array of entries in the column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified column is greater
* than the number of columns in this matrix
*/
double [] getColumnAsDoubleArray(int col) throws MatrixIndexException;
/**
* Returns the entry in the specified row and column.
*
* @param row row location of entry to be fetched
* @param column column location of entry to be fetched
* @return matrix entry in row,column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* the dimensions of this matrix
*/
BigDecimal getEntry(int row, int column) throws MatrixIndexException;
/**
* Returns the entry in the specified row and column as a double
*
* @param row row location of entry to be fetched
* @param column column location of entry to be fetched
* @return matrix entry in row,column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* the dimensions of this matrix
*/
double getEntryAsDouble(int row, int column) throws MatrixIndexException;
/**
* Sets the entry in the specified row and column to the specified value.
*
* @param row row location of entry to be set
* @param column column location of entry to be set
* @param value value to set
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* he dimensions of this matrix
*/
void setEntry(int row, int column, BigDecimal value)
throws MatrixIndexException;
/**
* Sets the entry in the specified row and column to the specified value.
*
* @param row row location of entry to be set
* @param column column location of entry to be set
* @param value value to set
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* he dimensions of this matrix
*/
void setEntry(int row, int column, double value)
throws MatrixIndexException;
/**
* Returns the transpose of this matrix.
*
* @return transpose matrix
*/
BigMatrix transpose();
/**
* Returns the inverse of this matrix.
*
* @return inverse matrix
* @throws org.apache.commons.math.linear.InvalidMatrixException if this is not invertible
*/
BigMatrix inverse() throws InvalidMatrixException;
/**
* Returns the determinant of this matrix.
*
* @return determinant
*@throws InvalidMatrixException if matrix is not square
*/
BigDecimal getDeterminant();
/**
* Is this a square matrix?
* @return true if the matrix is square (rowDimension = columnDimension)
*/
boolean isSquare();
/**
* Is this a singular matrix?
* @return true if the matrix is singular
*/
boolean isSingular();
/**
* Returns the number of rows in the matrix.
*
* @return rowDimension
*/
int getRowDimension();
/**
* Returns the number of columns in the matrix.
*
* @return columnDimension
*/
int getColumnDimension();
/**
* Returns the <a href="http://mathworld.wolfram.com/MatrixTrace.html">
* trace</a> of the matrix (the sum of the elements on the main diagonal).
*
* @return trace
*/
BigDecimal getTrace();
/**
* Returns the result of multiplying this by the vector <code>v</code>.
*
* @param v the vector to operate on
* @return this*v
* @throws IllegalArgumentException if columnDimension != v.size()
*/
BigDecimal[] operate(BigDecimal[] v) throws IllegalArgumentException;
/**
* Returns the (row) vector result of premultiplying this by the vector <code>v</code>.
*
* @param v the row vector to premultiply by
* @return v*this
* @throws IllegalArgumentException if rowDimension != v.size()
*/
BigDecimal[] preMultiply(BigDecimal[] v) throws IllegalArgumentException;
/**
* Returns the solution vector for a linear system with coefficient
* matrix = this and constant vector = <code>b</code>.
*
* @param b constant vector
* @return vector of solution values to AX = b, where A is *this
* @throws IllegalArgumentException if this.rowDimension != b.length
* @throws org.apache.commons.math.linear.InvalidMatrixException if this matrix is not square or is singular
*/
BigDecimal[] solve(BigDecimal[] b) throws IllegalArgumentException, InvalidMatrixException;
/**
* Returns a matrix of (column) solution vectors for linear systems with
* coefficient matrix = this and constant vectors = columns of
* <code>b</code>.
*
* @param b matrix of constant vectors forming RHS of linear systems to
* to solve
* @return matrix of solution vectors
* @throws IllegalArgumentException if this.rowDimension != row dimension
* @throws org.apache.commons.math.linear.InvalidMatrixException if this matrix is not square or is singular
*/
BigMatrix solve(BigMatrix b) throws IllegalArgumentException, InvalidMatrixException;
}
/*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math.linear;
import java.math.BigDecimal;
/**
* Interface defining a real-valued matrix with basic algebraic operations, using
* BigDecimal representations for the entries.
*
* @version $Revision: 1.3 $ $Date: 2004/06/23 16:26:17 $
*/
public interface BigMatrix {
/**
* Returns a (deep) copy of this.
*
* @return matrix copy
*/
BigMatrix copy();
/**
* Compute the sum of this and m.
*
* @param m matrix to be added
* @return this + m
* @exception IllegalArgumentException if m is not the same size as this
*/
BigMatrix add(BigMatrix m) throws IllegalArgumentException;
/**
* Compute this minus m.
*
* @param m matrix to be subtracted
* @return this + m
* @exception IllegalArgumentException if m is not the same size as this
*/
BigMatrix subtract(BigMatrix m) throws IllegalArgumentException;
/**
* Returns the result of adding d to each entry of this.
*
* @param d value to be added to each entry
* @return d + this
*/
BigMatrix scalarAdd(BigDecimal d);
/**
* Returns the result multiplying each entry of this by d.
*
* @param d value to multiply all entries by
* @return d * this
*/
BigMatrix scalarMultiply(BigDecimal d);
/**
* Returns the result postmultiplying this by m.
*
* @param m matrix to postmultiply by
* @return this * m
* @throws IllegalArgumentException
* if columnDimension(this) != rowDimension(m)
*/
BigMatrix multiply(BigMatrix m) throws IllegalArgumentException;
/**
* Returns the result premultiplying this by <code>m</code>.
* @param m matrix to premultiply by
* @return m * this
* @throws IllegalArgumentException
* if rowDimension(this) != columnDimension(m)
*/
public BigMatrix preMultiply(BigMatrix m) throws IllegalArgumentException;
/**
* Returns matrix entries as a two-dimensional array.
*
* @return 2-dimensional array of entries
*/
BigDecimal[][] getData();
/**
* Returns matrix entries as a two-dimensional array.
*
* @return 2-dimensional array of entries
*/
double [][] getDataAsDoubleArray();
/**
* Overwrites the underlying data for the matrix with
* a fresh copy of <code>data</code>.
*
* @param data 2-dimensional array of entries
*/
void setData(BigDecimal[][] data);
/**
* Overwrites the underlying data for the matrix with
* a fresh copy of <code>data</code>.
*
* @param data 2-dimensional array of entries
*/
void setData(double[][] data);
/***
* Sets the rounding mode to use when dividing values
* @see java.math.BigDecimal
* @param roundingMode
*/
void setRoundingMode(int roundingMode);
/***
* Gets the rounding mode
* @return the rounding mode
*/
int getRoundingMode();
/**
* Returns the <a href="http://mathworld.wolfram.com/MaximumAbsoluteRowSumNorm.html">
* maximum absolute row sum norm</a> of the matrix.
*
* @return norm
*/
BigDecimal getNorm();
/**
* Returns the entries in row number <code>row</code> as an array.
*
* @param row the row to be fetched
* @return array of entries in the row
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified row is greater
* than the number of rows in this matrix
*/
BigDecimal[] getRow(int row) throws MatrixIndexException;
/**
* Returns the entries in row number <code>row</code> as an array
* of double values.
*
* @param row the row to be fetched
* @return array of entries in the row
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified row is greater
* than the number of rows in this matrix
*/
double [] getRowAsDoubleArray(int row) throws MatrixIndexException;
/**
* Returns the entries in column number <code>col</code> as an array.
*
* @param col column to fetch
* @return array of entries in the column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified column is greater
* than the number of columns in this matrix
*/
BigDecimal[] getColumn(int col) throws MatrixIndexException;
/**
* Returns the entries in column number <code>col</code> as an array
* of double values.
*
* @param col column to fetch
* @return array of entries in the column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified column is greater
* than the number of columns in this matrix
*/
double [] getColumnAsDoubleArray(int col) throws MatrixIndexException;
/**
* Returns the entry in the specified row and column.
*
* @param row row location of entry to be fetched
* @param column column location of entry to be fetched
* @return matrix entry in row,column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* the dimensions of this matrix
*/
BigDecimal getEntry(int row, int column) throws MatrixIndexException;
/**
* Returns the entry in the specified row and column as a double
*
* @param row row location of entry to be fetched
* @param column column location of entry to be fetched
* @return matrix entry in row,column
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* the dimensions of this matrix
*/
double getEntryAsDouble(int row, int column) throws MatrixIndexException;
/**
* Sets the entry in the specified row and column to the specified value.
*
* @param row row location of entry to be set
* @param column column location of entry to be set
* @param value value to set
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* he dimensions of this matrix
*/
void setEntry(int row, int column, BigDecimal value)
throws MatrixIndexException;
/**
* Sets the entry in the specified row and column to the specified value.
*
* @param row row location of entry to be set
* @param column column location of entry to be set
* @param value value to set
* @throws org.apache.commons.math.linear.MatrixIndexException if the specified coordinate is outside
* he dimensions of this matrix
*/
void setEntry(int row, int column, double value)
throws MatrixIndexException;
/**
* Returns the transpose of this matrix.
*
* @return transpose matrix
*/
BigMatrix transpose();
/**
* Returns the inverse of this matrix.
*
* @return inverse matrix
* @throws org.apache.commons.math.linear.InvalidMatrixException if this is not invertible
*/
BigMatrix inverse() throws InvalidMatrixException;
/**
* Returns the determinant of this matrix.
*
* @return determinant
*@throws InvalidMatrixException if matrix is not square
*/
BigDecimal getDeterminant();
/**
* Is this a square matrix?
* @return true if the matrix is square (rowDimension = columnDimension)
*/
boolean isSquare();
/**
* Is this a singular matrix?
* @return true if the matrix is singular
*/
boolean isSingular();
/**
* Returns the number of rows in the matrix.
*
* @return rowDimension
*/
int getRowDimension();
/**
* Returns the number of columns in the matrix.
*
* @return columnDimension
*/
int getColumnDimension();
/**
* Returns the <a href="http://mathworld.wolfram.com/MatrixTrace.html">
* trace</a> of the matrix (the sum of the elements on the main diagonal).
*
* @return trace
*/
BigDecimal getTrace();
/**
* Returns the result of multiplying this by the vector <code>v</code>.
*
* @param v the vector to operate on
* @return this*v
* @throws IllegalArgumentException if columnDimension != v.size()
*/
BigDecimal[] operate(BigDecimal[] v) throws IllegalArgumentException;
/**
* Returns the (row) vector result of premultiplying this by the vector <code>v</code>.
*
* @param v the row vector to premultiply by
* @return v*this
* @throws IllegalArgumentException if rowDimension != v.size()
*/
BigDecimal[] preMultiply(BigDecimal[] v) throws IllegalArgumentException;
/**
* Returns the solution vector for a linear system with coefficient
* matrix = this and constant vector = <code>b</code>.
*
* @param b constant vector
* @return vector of solution values to AX = b, where A is *this
* @throws IllegalArgumentException if this.rowDimension != b.length
* @throws org.apache.commons.math.linear.InvalidMatrixException if this matrix is not square or is singular
*/
BigDecimal[] solve(BigDecimal[] b) throws IllegalArgumentException, InvalidMatrixException;
/**
* Returns a matrix of (column) solution vectors for linear systems with
* coefficient matrix = this and constant vectors = columns of
* <code>b</code>.
*
* @param b matrix of constant vectors forming RHS of linear systems to
* to solve
* @return matrix of solution vectors
* @throws IllegalArgumentException if this.rowDimension != row dimension
* @throws org.apache.commons.math.linear.InvalidMatrixException if this matrix is not square or is singular
*/
BigMatrix solve(BigMatrix b) throws IllegalArgumentException, InvalidMatrixException;
}

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ import java.io.Serializable;
* explicitly invoke <code>LUDecompose()</code> to recompute the decomposition
* before using any of the methods above.
*
* @version $Revision: 1.24 $ $Date: 2004/06/07 03:26:31 $
* @version $Revision: 1.25 $ $Date: 2004/06/23 16:26:17 $
*/
public class RealMatrixImpl implements RealMatrix, Serializable {
@ -415,7 +415,7 @@ public class RealMatrixImpl implements RealMatrix, Serializable {
if (isSingular()) { // note: this has side effect of attempting LU decomp if lu == null
return 0d;
} else {
double det = (double) parity;
double det = parity;
for (int i = 0; i < this.getRowDimension(); i++) {
det *= lu[i][i];
}

View File

@ -52,7 +52,7 @@ import org.apache.commons.math.stat.univariate.SummaryStatistics;
* entry per line.</li>
* </ul></p>
*
* @version $Revision: 1.26 $ $Date: 2004/06/16 03:16:26 $
* @version $Revision: 1.27 $ $Date: 2004/06/23 16:26:17 $
*/
public class EmpiricalDistributionImpl implements Serializable, EmpiricalDistribution {
@ -132,7 +132,13 @@ public class EmpiricalDistributionImpl implements Serializable, EmpiricalDistrib
fillBinStats(in);
loaded = true;
} finally {
if (in != null) try {in.close();} catch (Exception ex) {};
if (in != null) {
try {
in.close();
} catch (Exception ex) {
// ignore
}
}
}
}
@ -155,11 +161,13 @@ public class EmpiricalDistributionImpl implements Serializable, EmpiricalDistrib
fillBinStats(in);
loaded = true;
} finally {
if (in != null)
if (in != null) {
try {
in.close();
} catch (Exception ex) {
};
// ignore
}
}
}
}

View File

@ -40,7 +40,7 @@ import java.net.MalformedURLException;
* standard deviation = <code>sigma</code></li>
* <li> CONSTANT_MODE -- returns <code>mu</code> every time.</li></ul>
*
* @version $Revision: 1.13 $ $Date: 2004/06/14 23:15:15 $
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:17 $
*
*/
public class ValueServer implements Serializable {
@ -242,7 +242,9 @@ public class ValueServer implements Serializable {
try {
filePointer.close();
filePointer = null;
} catch (IOException ex) {}
} catch (IOException ex) {
// ignore
}
}
filePointer = new BufferedReader(new InputStreamReader(valuesFileURL.openStream()));
}

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import org.apache.commons.math.util.ContinuedFraction;
/**
* This is a utility class that provides computation methods related to the
* Beta family of functions.
*
* @version $Revision: 1.20 $ $Date: 2004/06/10 18:27:47 $
*
* @version $Revision: 1.21 $ $Date: 2004/06/23 16:26:17 $
*/
public class Beta implements Serializable {
/** Maximum allowed numerical error. */

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,8 +22,8 @@ import org.apache.commons.math.MathException;
/**
* This is a utility class that provides computation methods related to the
* error functions.
*
* @version $Revision: 1.1 $ $Date: 2004/05/05 19:54:58 $
*
* @version $Revision: 1.2 $ $Date: 2004/06/23 16:26:17 $
*/
public class Erf implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,8 +24,8 @@ import org.apache.commons.math.util.ContinuedFraction;
/**
* This is a utility class that provides computation methods related to the
* Gamma family of functions.
*
* @version $Revision: 1.20 $ $Date: 2004/06/10 18:34:53 $
*
* @version $Revision: 1.21 $ $Date: 2004/06/23 16:26:17 $
*/
public class Gamma implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -34,8 +34,8 @@ import java.util.TreeMap;
* <p>
* The values are ordered using the default (natural order), unless a
* <code>Comparator</code>is supplied in the constructor.
*
* @version $Revision: 1.23 $ $Date: 2004/06/20 16:53:17 $
*
* @version $Revision: 1.24 $ $Date: 2004/06/23 16:26:17 $
*/
public class Frequency implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -30,7 +30,7 @@ import org.apache.commons.math.stat.univariate.summary.SumOfSquares;
* StatUtils provides static implementations of common double[] based
* statistical methods. These return a single result value or in some cases, as
* identified in the javadoc for each method, <code>Double.NaN.</code>
* @version $Revision: 1.28 $ $Date: 2004/06/14 23:26:53 $
* @version $Revision: 1.29 $ $Date: 2004/06/23 16:26:17 $
*/
public final class StatUtils {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,8 +19,8 @@ import org.apache.commons.math.MathException;
/**
* An interface for Chi-Square tests.
*
* @version $Revision: 1.2 $ $Date: 2004/05/19 15:06:44 $
*
* @version $Revision: 1.3 $ $Date: 2004/06/23 16:26:14 $
*/
public interface ChiSquareTest {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,7 +22,7 @@ import org.apache.commons.math.distribution.ChiSquaredDistribution;
/**
* Implements Chi-Square test statistics defined in the {@link ChiSquareTest} interface.
*
* @version $Revision: 1.7 $ $Date: 2004/06/20 02:54:05 $
* @version $Revision: 1.8 $ $Date: 2004/06/23 16:26:14 $
*/
public class ChiSquareTestImpl implements ChiSquareTest {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,8 +20,8 @@ import org.apache.commons.math.stat.univariate.StatisticalSummary;
/**
* An interface for Student's t-tests.
*
* @version $Revision: 1.5 $ $Date: 2004/06/02 13:08:55 $
*
* @version $Revision: 1.6 $ $Date: 2004/06/23 16:26:14 $
*/
public interface TTest {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,13 +24,16 @@ import org.apache.commons.math.stat.univariate.StatisticalSummary;
/**
* Implements t-test statistics defined in the {@link TTest} interface.
*
* @version $Revision: 1.7 $ $Date: 2004/06/14 23:26:53 $
* @version $Revision: 1.8 $ $Date: 2004/06/23 16:26:14 $
*/
public class TTestImpl implements TTest {
/** Cached DistributionFactory used to create TDistribution instances */
private DistributionFactory distributionFactory = null;
/**
* Default constructor.
*/
public TTestImpl() {
super();
}
@ -232,8 +235,6 @@ public class TTestImpl implements TTest {
* @param equalVariances are the sample variances assumed equal?
* @return t statistic
* @throws IllegalArgumentException if the precondition is not met
* @throws MathException if the statistic can not be computed do to a
* convergence or other numerical error.
*/
public double t(double[] sample1, double[] sample2, boolean equalVariances)
throws IllegalArgumentException {
@ -698,6 +699,7 @@ public class TTestImpl implements TTest {
/**
* Gets a DistributionFactory to use in creating TDistribution instances.
* @return a distribution factory.
*/
protected DistributionFactory getDistributionFactory() {
if (distributionFactory == null) {
@ -745,6 +747,7 @@ public class TTestImpl implements TTest {
* @param v2 second sample variance
* @param n1 first sample n
* @param n2 second sample n
* @param equalVariances are variances assumed equal?
* @return t test statistic
*/
protected double t(double m1, double m2, double v1, double v2, double n1,

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -49,7 +49,7 @@ import org.apache.commons.math.distribution.TDistribution;
* the necessary computations to return the requested statistic.</li>
* </ul>
*
* @version $Revision: 1.3 $ $Date: 2004/05/19 14:16:32 $
* @version $Revision: 1.4 $ $Date: 2004/06/23 16:26:17 $
*/
public class BivariateRegression implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,8 +23,8 @@ import java.io.Serializable;
* Abstract Implementation for the {@link StorelessUnivariateStatistic} interface.
* <p>
* Provides a default <code>evaluate()</code> implementation.
*
* @version $Revision: 1.16 $ $Date: 2004/06/17 22:31:58 $
*
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:16 $
*/
public abstract class AbstractStorelessUnivariateStatistic
extends AbstractUnivariateStatistic
@ -72,7 +72,7 @@ public abstract class AbstractStorelessUnivariateStatistic
* Returns true iff <code>object</code> is an
* <code>AbstractStorelessUnivariateStatistic</code> returning the same
* values as this for <code>getResult()</code> and <code>getN()</code>
*
* @param object object to test equality against.
* @return true if object returns the same value as this
*/
public boolean equals(Object object) {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,7 +21,7 @@ import java.io.Serializable;
* Abstract Implementation for UnivariateStatistics.
* Provides the ability to extend polymophically so that
* indiviual statistics do not need to implement these methods.
* @version $Revision: 1.17 $ $Date: 2004/06/01 21:34:35 $
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:16 $
*/
public abstract class AbstractUnivariateStatistic
implements UnivariateStatistic, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -33,8 +33,8 @@ import org.apache.commons.math.stat.univariate.summary.SumOfSquares;
/**
* Abstract factory class for univariate statistical summaries.
*
* @version $Revision: 1.7 $ $Date: 2004/06/14 23:26:53 $
*
* @version $Revision: 1.8 $ $Date: 2004/06/23 16:26:16 $
*/
public abstract class DescriptiveStatistics implements StatisticalSummary, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,8 +22,8 @@ import org.apache.commons.math.util.ResizableDoubleArray;
/**
* Default implementation of
* {@link org.apache.commons.math.stat.univariate.DescriptiveStatistics}.
*
* @version $Revision: 1.8 $ $Date: 2004/06/14 23:26:53 $
*
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:16 $
*/
public class DescriptiveStatisticsImpl extends DescriptiveStatistics implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -17,8 +17,8 @@ package org.apache.commons.math.stat.univariate;
/**
* Reporting interface for basic univariate statistics.
*
* @version $Revision: 1.3 $ $Date: 2004/06/14 23:26:53 $
*
* @version $Revision: 1.4 $ $Date: 2004/06/23 16:26:16 $
*/
public interface StatisticalSummary {
/**

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Value object representing the results of a univariate statistical summary.
*
* @version $Revision: 1.2 $ $Date: 2004/06/20 01:50:18 $
* @version $Revision: 1.3 $ $Date: 2004/06/23 16:26:16 $
*/
public class StatisticalSummaryValues implements Serializable,
StatisticalSummary {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,8 +21,8 @@ package org.apache.commons.math.stat.univariate;
* <p>
* This interface is designed to be used for calculating statistics that can be computed in
* one pass through the data without storing the full array of sample values.
*
* @version $Revision: 1.15 $ $Date: 2004/03/21 21:57:19 $
*
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:16 $
*/
public interface StorelessUnivariateStatistic extends UnivariateStatistic {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,8 +22,8 @@ import org.apache.commons.math.util.MathUtils;
/**
* Abstract factory class for univariate statistical summaries.
*
* @version $Revision: 1.8 $ $Date: 2004/06/17 23:14:55 $
*
* @version $Revision: 1.9 $ $Date: 2004/06/23 16:26:16 $
*/
public abstract class SummaryStatistics implements StatisticalSummary, Serializable {
@ -162,7 +162,7 @@ public abstract class SummaryStatistics implements StatisticalSummary, Serializa
/**
* Returns true iff <code>object</code> is a <code>SummaryStatistics</code>
* instance and all statistics have the same values as this.
*
* @param object the object to test equality against.
* @return true if object equals this
*/
public boolean equals(Object object) {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -28,8 +28,8 @@ import org.apache.commons.math.stat.univariate.summary.SumOfSquares;
/**
* Provides a default {@link SummaryStatistics} implementation.
*
* @version $Revision: 1.5 $ $Date: 2004/06/17 23:27:52 $
*
* @version $Revision: 1.6 $ $Date: 2004/06/23 16:26:16 $
*/
public class SummaryStatisticsImpl extends SummaryStatistics implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,7 +20,7 @@ package org.apache.commons.math.stat.univariate;
* double[] based content using an implemented statistical approach.
* The interface provides two "stateless" simple methods to calculate
* a statistic from a double[] based parameter.
* @version $Revision: 1.13 $ $Date: 2004/03/04 04:25:09 $
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:16 $
*/
public interface UnivariateStatistic {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -26,7 +26,7 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
* recursive strategy
* </a>. Both incremental and evaluation strategies currently use this approach.
* @version $Revision: 1.14 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public class FirstMoment extends AbstractStorelessUnivariateStatistic implements Serializable{

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,7 +22,7 @@ import java.io.Serializable;
* <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
* recursive strategy
* </a>. Both incremental and evaluation strategies currently use this approach.
* @version $Revision: 1.16 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:15 $
*/
public class FourthMoment extends ThirdMoment implements Serializable{

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -33,9 +33,9 @@ import org.apache.commons.math.stat.univariate.summary.SumOfLogs;
* <code>Double.NEGATIVE_INFINITY</code> are among the values, the result is
* <code>NaN.</code></li>
* </ul>
*
*
* @version $Revision: 1.19 $ $Date: 2004/06/18 07:03:40 $
*
*
* @version $Revision: 1.20 $ $Date: 2004/06/23 16:26:15 $
*/
public class GeometricMean extends SumOfLogs implements Serializable{

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -30,8 +30,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <p>
* Note that this statistic is undefined for n < 4. <code>Double.Nan</code> is returned when
* there is not sufficient data to compute the statistic.
*
* @version $Revision: 1.21 $ $Date: 2004/06/18 04:14:27 $
*
* @version $Revision: 1.22 $ $Date: 2004/06/23 16:26:14 $
*/
public class Kurtosis extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -29,7 +29,7 @@ import org.apache.commons.math.stat.univariate.summary.Sum;
/**
* Returns the <a href="http://www.xycoon.com/arithmetic_mean.htm">
* arithmetic mean </a> of the available values.
* @version $Revision: 1.17 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:15 $
*/
public class Mean extends AbstractStorelessUnivariateStatistic implements Serializable{

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,7 +22,7 @@ import java.io.Serializable;
* <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
* recursive strategy
* </a>. Both incremental and evaluation strategies currently use this approach.
* @version $Revision: 1.15 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:15 $
*/
public class SecondMoment extends FirstMoment implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -27,8 +27,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* skewness = [n / (n -1) (n - 2)] sum[(x_i - mean)^3] / std^3
* <p>
* where n is the number of values, mean is the {@link Mean} and std is the {@link StandardDeviation}
*
* @version $Revision: 1.20 $ $Date: 2004/04/27 16:42:30 $
*
* @version $Revision: 1.21 $ $Date: 2004/06/23 16:26:14 $
*/
public class Skewness extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ import java.io.Serializable;
/**
*
* @version $Revision: 1.16 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.17 $ $Date: 2004/06/23 16:26:15 $
*/
public class StandardDeviation extends Variance implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -22,7 +22,7 @@ import java.io.Serializable;
* <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
* recursive strategy
* </a>. Both incremental and evaluation strategies currently use this approach.
* @version $Revision: 1.15 $ $Date: 2004/04/27 16:42:30 $
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:14 $
*/
public class ThirdMoment extends SecondMoment implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,8 +24,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <a href="http://doi.acm.org/10.1145/359146.359152">Chan, T. F. and
* J. G. Lewis 1979, <i>Communications of the ACM</i>,
* vol. 22 no. 9, pp. 526-531.</a>.
*
* @version $Revision: 1.19 $ $Date: 2004/04/27 16:42:30 $
*
* @version $Revision: 1.20 $ $Date: 2004/06/23 16:26:15 $
*/
public class Variance extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -28,8 +28,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <li>If any of the values equals <code>Double.POSITIVE_INFINITY</code>,
* the result is <code>Double.POSITIVE_INFINITY.</code></li>
* </ul>
*
* @version $Revision: 1.17 $ $Date: 2004/06/18 13:24:06 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:17 $
*/
public class Max extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,8 +21,8 @@ import java.io.Serializable;
/**
* Returns the <a href="http://www.xycoon.com/median_2.htm">median</a> of the
* available values.
*
* @version $Revision: 1.13 $ $Date: 2004/04/27 16:42:33 $
*
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:17 $
*/
public class Median extends Percentile implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -28,8 +28,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <li>If any of the values equals <code>Double.NEGATIVE_INFINITY</code>,
* the result is <code>Double.NEGATIVE_INFINITY.</code></li>
* </ul>
*
* @version $Revision: 1.18 $ $Date: 2004/06/18 22:11:33 $
*
* @version $Revision: 1.19 $ $Date: 2004/06/23 16:26:17 $
*/
public class Min extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -42,7 +42,7 @@ import org.apache.commons.math.stat.univariate.AbstractUnivariateStatistic;
* </li>
* </ol>
* <p>
*
*
* To compute percentiles, the data must be (totally) ordered. Input arrays
* are copied and then sorted using {@link java.util.Arrays#sort(double[])}.
* The ordering used by <code>Arrays.sort(double[]</code> is the one determined
@ -55,8 +55,8 @@ import org.apache.commons.math.stat.univariate.AbstractUnivariateStatistic;
* Since percentile estimation usually involves interpolation between array
* elements, arrays containing <code>NaN</code> or infinite values will often
* result in <code>NaN<code> or infinite values returned.
*
* @version $Revision: 1.20 $ $Date: 2004/06/19 21:14:54 $
*
* @version $Revision: 1.21 $ $Date: 2004/06/23 16:26:17 $
*/
public class Percentile extends AbstractUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -27,8 +27,8 @@ import org
/**
* Returns the product for this collection of values.
*
* @version $Revision: 1.17 $ $Date: 2004/04/27 16:42:32 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:16 $
*/
public class Product extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -21,8 +21,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
/**
* The sum of the values that have been added to Univariate.
*
* @version $Revision: 1.19 $ $Date: 2004/04/27 16:42:32 $
*
* @version $Revision: 1.20 $ $Date: 2004/06/23 16:26:16 $
*/
public class Sum extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,8 +31,8 @@ import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatis
* <code>Double.NEGATIVE_INFINITY</code> are among the values, the result is
* <code>NaN.</code></li>
* </ul>
*
* @version $Revision: 1.18 $ $Date: 2004/06/18 06:32:07 $
*
* @version $Revision: 1.19 $ $Date: 2004/06/23 16:26:16 $
*/
public class SumOfLogs extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -27,8 +27,8 @@ import org
/**
* Returns the sum of the squares of the available values.
*
* @version $Revision: 1.17 $ $Date: 2004/04/27 16:42:32 $
*
* @version $Revision: 1.18 $ $Date: 2004/06/23 16:26:16 $
*/
public class SumOfSquares extends AbstractStorelessUnivariateStatistic implements Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,7 +23,7 @@ import org.apache.commons.math.MathException;
/**
* Provides a generic means to evaluate continued fractions. Subclasses simply
* provided the a and b coefficients to evaluate the continued fraction.
*
*
* <p>
* References:
* <ul>
@ -31,8 +31,8 @@ import org.apache.commons.math.MathException;
* Continued Fraction</a></li>
* </ul>
* </p>
*
* @version $Revision: 1.13 $ $Date: 2004/06/02 00:04:11 $
*
* @version $Revision: 1.14 $ $Date: 2004/06/23 16:26:16 $
*/
public abstract class ContinuedFraction implements Serializable {
@ -105,8 +105,8 @@ public abstract class ContinuedFraction implements Serializable {
* The implementation of this method is based on:
* <ul>
* <li>O. E-gecio-glu, C . K. Koc, J. Rifa i Coma,
* <a href="http://citeseer.nj.nec.com/egecioglu91fast.html">
* Fast Computation of Continued Fractions</a>, Computers Math. Applic.,
* <a href="http://citeseer.ist.psu.edu/egecioglu91fast.html">
* On Fast Computation of Continued Fractions</a>, Computers Math. Applic.,
* 21(2--3), 1991, 167--169.</li>
* </ul>
*

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -25,8 +25,8 @@ import org.apache.commons.math.MathException;
* provides some simple conversion capabilities to turn any java/lang.Number
* into a primitive double or to turn a String representation of a Number into
* a double.
*
* @version $Revision: 1.15 $ $Date: 2004/06/18 04:59:06 $
*
* @version $Revision: 1.16 $ $Date: 2004/06/23 16:26:15 $
*/
public class DefaultTransformer implements NumberTransformer, Serializable {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,8 +20,8 @@ package org.apache.commons.math.util;
* Provides a standard interface for double arrays. Allows different
* array implementations to support various storage mechanisms
* such as automatic expansion, contraction, and array "rolling".
*
* @version $Revision: 1.12 $ $Date: 2004/06/14 21:41:33 $
*
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:16 $
*/
public interface DoubleArray {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ package org.apache.commons.math.util;
/**
* Some useful additions to the built-in functions in {@link Math}.
*
* @version $Revision: 1.18 $ $Date: 2004/06/17 21:31:00 $
* @version $Revision: 1.19 $ $Date: 2004/06/23 16:26:16 $
*/
public final class MathUtils {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -19,7 +19,7 @@ import org.apache.commons.math.MathException;
/**
* Subclasses implementing this interface can transform Objects to doubles.
* @version $Revision: 1.10 $ $Date: 2004/02/21 21:35:16 $
* @version $Revision: 1.11 $ $Date: 2004/06/23 16:26:15 $
*/
public interface NumberTransformer {

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -66,7 +66,7 @@ import java.io.Serializable;
* is violated.
* </p>
* <p>
* @version $Revision: 1.1 $ $Date: 2004/06/14 21:41:33 $
* @version $Revision: 1.2 $ $Date: 2004/06/23 16:26:16 $
*/
public class ResizableDoubleArray implements DoubleArray, Serializable {
@ -469,10 +469,11 @@ public class ResizableDoubleArray implements DoubleArray, Serializable {
}
/**
* Returns a double[] array containing the elements of this
* Returns a double array containing the elements of this
* <code>ResizableArray</code>. This method returns a copy, not a
* reference to the underlying array, so that changes made to the returned
* array have no effect on this <code>ResizableArray.</code>
* @return the double array.
*/
public double[] getElements() {
double[] elementArray = new double[numElements];
@ -589,7 +590,7 @@ public class ResizableDoubleArray implements DoubleArray, Serializable {
* <li><code>expansionFactor > 1</code></li>
* <li><code>contractionFactor >= expansionFactor</code></li>
* </ul>
*
* @param expansionFactor the new expansion factor value.
* @throws IllegalArgumentException if expansionFactor is <= 1 or greater
* than contractionFactor
*/

View File

@ -1,12 +1,12 @@
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -28,7 +28,7 @@ import org.apache.commons.math.MathException;
* It provides a means to set NumberTransformers that will be selected
* based on the Class of the object handed to the Maps
* <code>double transform(Object o)</code> method.
* @version $Revision: 1.14 $ $Date: 2004/06/18 04:59:06 $
* @version $Revision: 1.15 $ $Date: 2004/06/23 16:26:15 $
*/
public class TransformerMap implements NumberTransformer, Serializable {

View File

@ -26,7 +26,7 @@ import org.apache.commons.math.util.DefaultTransformer;
import org.apache.commons.math.util.NumberTransformer;
/**
* @version $Revision: 1.4 $ $Date: 2004/06/01 21:28:06 $
* @version $Revision: 1.5 $ $Date: 2004/06/23 16:26:18 $
*/
public class ListUnivariateImpl extends DescriptiveStatistics implements Serializable {
@ -196,7 +196,7 @@ public class ListUnivariateImpl extends DescriptiveStatistics implements Seriali
}
/**
* @see org.apache.commons.math.stat.Univariate#setWindowSize(int)
* @see org.apache.commons.math.stat.univariate.DescriptiveStatistics#setWindowSize(int)
*/
public synchronized void setWindowSize(int windowSize) {
this.windowSize = windowSize;
@ -207,7 +207,10 @@ public class ListUnivariateImpl extends DescriptiveStatistics implements Seriali
list.remove(0);
}
}
/**
* @see org.apache.commons.math.stat.univariate.DescriptiveStatistics#getWindowSize
*/
public int getWindowSize() {
return windowSize;
}

View File

@ -16,7 +16,7 @@
-->
<?xml-stylesheet type="text/xsl" href="xdoc.xsl"?>
<!-- $Revision: 1.10 $ $Date: 2004/02/28 17:47:37 $ -->
<!-- $Revision: 1.11 $ $Date: 2004/06/23 16:26:17 $ -->
<document>
<properties>
<title>Developers Guide</title>
@ -104,9 +104,9 @@
<p>
Commons-math follows <a href="http://java.sun.com/docs/codeconv/">Code
Conventions for the Java Programming Language</a>. As part of the maven
build process, style checking is performed using the checkStyle plugin,
using the properties specified in <code>checkStyle.properties</code>.
Committed code <i>should</i> generate no checkStyle errors.
build process, style checking is performed using the Checkstyle plugin,
using the properties specified in <code>checkstyle.xml</code>.
Committed code <i>should</i> generate no Checkstyle errors.
</p>
</subsection>
<subsection name='Documentation'>
@ -146,9 +146,9 @@
All new source file submissions <i>must</i> include the Apache Software
License in a comment that begins the file </li>
<li>
All contributions must comply with the terms of the
<a href="http://www.apache.org/foundation/ASF_Contributor_License_1_form.pdf">
Apache Contributor License Agreement (CLA)</a></li>
All contributions must comply with the terms of the Apache
<a href="http://www.apache.org/licenses/cla.pdf">Contributor License
Agreement (CLA)</a></li>
<li>
Patches <i>must</i> be accompanied by a clear reference to a "source"
- if code has been "ported" from another language, clearly state the

View File

@ -17,7 +17,7 @@
-->
<?xml-stylesheet type="text/xsl" href="xdoc.xsl"?>
<!-- $Revision: 1.22 $ $Date: 2004/05/17 05:59:14 $ -->
<!-- $Revision: 1.23 $ $Date: 2004/06/23 16:26:17 $ -->
<document>
<properties>
<title>Tasks: Done And To Do</title>
@ -35,7 +35,7 @@
test cases as possible for your code.</p>
<dl>
<dt>Develop user's guide following the package structure.</dt>
<dd>Incomplete Sections: 6.2 Double Array Utilities, 6.4 Binomial Coefficients, 7.4 Complex Formatting</dd>
<dd>Incomplete Sections: 6.2 Double Array Utilities, 6.4 Binomial Coefficients</dd>
<dt>Performance and accuracy testing.</dt>
<dd>If anyone is interested in helping out here, what we could really use is a wider selection of test cases for the core
numerical functions and validation against either other packages (e.g. R for the statistical stuff), verified datasets,
@ -49,7 +49,7 @@
<ul>
<li>Javadoc generation is still throwing warnings. Bring the Javadoc into compliance (i.e. reach zero warnings).</li>
<li>Verify that the code matches the documentation and identify obvious inefficiencies or numerical problems. All feedback/suggestions for improvement/patches are welcome.</li>
<li>CheckStyle with modified properties still shows many errors. Try to clean these up.</li>
<li>Checkstyle with modified properties still shows many errors. Try to clean these up.</li>
</ul>
</dd>
<dt>Javadoc</dt>
@ -64,7 +64,7 @@
<dd>
<ul>
<li>Rework unit tests for root finding</li>
<li>CheckStyle with modified properties still shows many errors. Try to clean these up.</li>
<li>Checkstyle with modified properties still shows many errors. Try to clean these up.</li>
<li>Finalize API (maybe move to stateless implementation)</li>
</ul>
</dd>

View File

@ -17,7 +17,7 @@
-->
<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
<!-- $Revision: 1.2 $ $Date: 2004/06/01 13:47:17 $ -->
<!-- $Revision: 1.3 $ $Date: 2004/06/23 16:26:16 $ -->
<document url="stat.html">
<properties>
<title>The Commons Math User Guide - Statistics</title>
@ -82,7 +82,7 @@ Complex answer = ComplexMath.log(first); // natural logarithm.
org.apache.commons.math.complex.ComplexFormat</a> class.
<code>ComplexFormat</code> is a <code>java.text.Format</code>
extension and, as such, is used like other formatting objects (e.g.
<code>java.text.SimpleDateFormat</code>:
<code>java.text.SimpleDateFormat</code>):
<source>ComplexFormat format = new ComplexFormat(); // default format
Complex c = new Complex(1.1111, 2.2222);
String s = format.format(c); // s contains "1.11 + 2.22i"</source>

View File

@ -17,7 +17,7 @@
-->
<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
<!-- $Revision: 1.9 $ $Date: 2004/06/01 13:47:17 $ -->
<!-- $Revision: 1.10 $ $Date: 2004/06/23 16:26:16 $ -->
<document url="index.html">
<properties>
<title>The Commons Math User Guide - Table of Contents</title>
@ -68,12 +68,13 @@
<li><a href="special.html">5. Special Functions</a>
<ul>
<li><a href="special.html#overview">5.1 Overview</a></li>
<li><a href="special.html#gamma">5.2 Gamma functions</a></li>
<li><a href="special.html#beta">5.3 Beta funtions</a></li>
<li><a href="special.html#erf">5.2 Erf functions</a></li>
<li><a href="special.html#gamma">5.3 Gamma functions</a></li>
<li><a href="special.html#beta">5.4 Beta funtions</a></li>
</ul></li>
<li><a href="utilities.html">6. Utilities</a>
<ul>
<li><a href="utilities#overview">6.1 Overview</a></li>
<li><a href="utilities.html#overview">6.1 Overview</a></li>
<li><a href="utilities.html#arrays">6.2 Double array utilities</a></li>
<li><a href="utilities.html#continued_fractions">6.3 Continued Fractions</a></li>
<li><a href="utilities.html#math_utils">6.4 binomial coefficients, factorials and other common math functions</a></li>

Some files were not shown because too many files have changed in this diff Show More