git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141139 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2004-03-21 21:57:19 +00:00
parent a6da5c1c93
commit 2457c77035
6 changed files with 25 additions and 23 deletions

View File

@ -43,7 +43,7 @@ import org.apache.commons.math.stat.SummaryStatistics;
* build grouped frequnecy histograms representing the input data or to
* generate random values "like" those in the input file -- i.e., the values
* generated will follow the distribution of the values in the file.
* @version $Revision: 1.15 $ $Date: 2004/02/21 21:35:15 $
* @version $Revision: 1.16 $ $Date: 2004/03/21 21:57:18 $
*/
public interface EmpiricalDistribution {
@ -70,7 +70,7 @@ public interface EmpiricalDistribution {
/**
* Computes the empirical distribution using data read from a URL.
* @param file url of the input file
* @param url url of the input file
* @throws IOException if an IO error occurs
*/
void load(URL url) throws IOException;

View File

@ -32,7 +32,7 @@ import org.apache.commons.math.stat.univariate.UnivariateStatistic;
/**
* Abstract superclass for DescriptiveStatistics implementations.
*
* @version $Revision: 1.4 $ $Date: 2004/02/21 21:35:15 $
* @version $Revision: 1.5 $ $Date: 2004/03/21 21:57:18 $
*/
public abstract class AbstractDescriptiveStatistics
extends DescriptiveStatistics {
@ -145,7 +145,7 @@ public abstract class AbstractDescriptiveStatistics
}
/**
* @see org.apache.commons.math.stat.DescriptiveStatistics#getPercentile()
* @see org.apache.commons.math.stat.DescriptiveStatistics#getPercentile(double)
*/
public double getPercentile(double p) {
return apply(new Percentile(p));

View File

@ -17,25 +17,26 @@ package org.apache.commons.math.stat.univariate;
/**
*
* Abstract Implementation for StorelessUnivariateStatistics.
* Provides the ability to extend polymophically so that
* indiviual statistics do not need to implement these methods unless
* there are better algorithms for handling the calculation.
* @version $Revision: 1.13 $ $Date: 2004/02/21 21:35:15 $
* Abstract Implementation for the {@link StorelessUnivariateStatistic} interface.
* <p>
* Provides a default <code>evaluate()</code> implementation.
*
* @version $Revision: 1.14 $ $Date: 2004/03/21 21:57:18 $
*/
public abstract class AbstractStorelessUnivariateStatistic
extends AbstractUnivariateStatistic
implements StorelessUnivariateStatistic {
/**
* This default implementation just calls {@link #increment} in a loop and then {@link #getResult} to
* compute the return value. Most implementations will override this method with a more efficient implementation.
* This default implementation just calls {@link #increment} in a loop over the input array and
* then {@link #getResult} to compute the return value.
* <p>
* Most implementations will override this method with a more efficient implementation that works
* directly with the input array.
*
* @see org.apache.commons.math.stat.univariate.UnivariateStatistic#evaluate(double[], int, int)
*/
public double evaluate(
final double[] values,
final int begin,
final int length) {
public double evaluate(final double[] values, final int begin, final int length) {
if (this.test(values, begin, length)) {
this.clear();
int l = begin + length;

View File

@ -17,11 +17,12 @@ package org.apache.commons.math.stat.univariate;
/**
* Extends the definition of {@link UnivariateStatistic} with an {@link #increment}
* method for adding values and updating internal state incrementally. 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.
* method for adding values and updating internal state incrementally.
* <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.14 $ $Date: 2004/02/21 21:35:15 $
* @version $Revision: 1.15 $ $Date: 2004/03/21 21:57:19 $
*/
public interface StorelessUnivariateStatistic extends UnivariateStatistic {

View File

@ -28,7 +28,7 @@ import org.apache.commons.math.stat.univariate.AbstractUnivariateStatistic;
* follows the first estimation procedure presented
* <a href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc252.htm">here.</a>
*
* @version $Revision: 1.15 $ $Date: 2004/03/13 20:02:28 $
* @version $Revision: 1.16 $ $Date: 2004/03/21 21:57:19 $
*/
public class Percentile extends AbstractUnivariateStatistic implements Serializable {
@ -107,7 +107,7 @@ public class Percentile extends AbstractUnivariateStatistic implements Serializa
*
* @param values Is a double[] containing the values
* @param p Is the quantile to evaluate to.
* @param start the first (0-based) element to include in the computation
* @param begin the first (0-based) element to include in the computation
* @param length the number of array elements to include
* @return the result of the evaluation or Double.NaN
* if the array is empty

View File

@ -26,12 +26,12 @@ import org.apache.commons.math.MathException;
* into a primitive double or to turn a String representation of a Number into
* a double.
*
* @version $Revision: 1.12 $ $Date: 2004/02/21 21:35:16 $
* @version $Revision: 1.13 $ $Date: 2004/03/21 21:57:19 $
*/
public class DefaultTransformer implements NumberTransformer, Serializable {
/**
* @param Object o Is the object that gets transformed.
* @param o the object that gets transformed.
* @return a double primitive representation of the Object o.
* @throws org.apache.commons.math.MathException If it cannot successfully
* be transformed or is null.