commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r811685 [4/24] - in /commons/proper/math/trunk: ./ src/main/java/org/apache/commons/math/ src/main/java/org/apache/commons/math/analysis/ src/main/java/org/apache/commons/math/analysis/integration/ src/main/java/org/apache/commons/math/anal...
Date Sat, 05 Sep 2009 17:37:05 GMT
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -35,10 +35,10 @@
 
     /** The shape parameter. */
     private double alpha;
-    
+
     /** The scale parameter. */
     private double beta;
-    
+
     /**
      * Create a new gamma distribution with the given alpha and beta values.
      * @param alpha the shape parameter.
@@ -49,10 +49,10 @@
         setAlpha(alpha);
         setBeta(beta);
     }
-    
+
     /**
      * For this distribution, X, this method returns P(X < x).
-     * 
+     *
      * The implementation of this method is based on:
      * <ul>
      * <li>
@@ -61,24 +61,24 @@
      * <li>Casella, G., & Berger, R. (1990). <i>Statistical Inference</i>.
      * Belmont, CA: Duxbury Press.</li>
      * </ul>
-     * 
+     *
      * @param x the value at which the CDF is evaluated.
-     * @return CDF for this distribution. 
+     * @return CDF for this distribution.
      * @throws MathException if the cumulative probability can not be
      *            computed due to convergence or other numerical errors.
      */
     public double cumulativeProbability(double x) throws MathException{
         double ret;
-    
+
         if (x <= 0.0) {
             ret = 0.0;
         } else {
             ret = Gamma.regularizedGammaP(getAlpha(), x / getBeta());
         }
-    
+
         return ret;
     }
-    
+
     /**
      * For this distribution, X, this method returns the critical point x, such
      * that P(X &lt; x) = <code>p</code>.
@@ -93,7 +93,7 @@
      *         probability.
      */
     @Override
-    public double inverseCumulativeProbability(final double p) 
+    public double inverseCumulativeProbability(final double p)
     throws MathException {
         if (p == 0) {
             return 0d;
@@ -103,7 +103,7 @@
         }
         return super.inverseCumulativeProbability(p);
     }
-    
+
     /**
      * Modify the shape parameter, alpha.
      * @param alpha the new shape parameter.
@@ -117,7 +117,7 @@
         }
         this.alpha = alpha;
     }
-    
+
     /**
      * Access the shape parameter, alpha
      * @return alpha.
@@ -125,7 +125,7 @@
     public double getAlpha() {
         return alpha;
     }
-    
+
     /**
      * Modify the scale parameter, beta.
      * @param beta the new scale parameter.
@@ -139,7 +139,7 @@
         }
         this.beta = beta;
     }
-    
+
     /**
      * Access the scale parameter, beta
      * @return beta.
@@ -163,7 +163,7 @@
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
      *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
@@ -178,10 +178,10 @@
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected double getDomainUpperBound(double p) {
@@ -198,7 +198,7 @@
             // use max value
             ret = Double.MAX_VALUE;
         }
-        
+
         return ret;
     }
 
@@ -206,7 +206,7 @@
      * Access the initial domain value, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return initial domain value
      */
@@ -224,7 +224,7 @@
             // use mean
             ret = getAlpha() * getBeta();
         }
-        
+
         return ret;
     }
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistribution.java Sat Sep  5 17:36:48 2009
@@ -36,31 +36,31 @@
      * @return the number of successes.
      */
     public abstract int getNumberOfSuccesses();
-    
+
     /**
      * Access the population size.
      * @return the population size.
      */
     public abstract int getPopulationSize();
-    
+
     /**
      * Access the sample size.
      * @return the sample size.
      */
     public abstract int getSampleSize();
-    
+
     /**
      * Modify the number of successes.
      * @param num the new number of successes.
      */
     public abstract void setNumberOfSuccesses(int num);
-    
+
     /**
      * Modify the population size.
      * @param size the new population size.
      */
     public abstract void setPopulationSize(int size);
-    
+
     /**
      * Modify the sample size.
      * @param size the new sample size.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -28,7 +28,7 @@
  * @version $Revision$ $Date$
  */
 public class HypergeometricDistributionImpl extends AbstractIntegerDistribution
-    implements HypergeometricDistribution, Serializable 
+    implements HypergeometricDistribution, Serializable
 {
 
     /** Serializable version identifier */
@@ -36,13 +36,13 @@
 
     /** The number of successes in the population. */
     private int numberOfSuccesses;
-    
+
     /** The population size. */
     private int populationSize;
-    
+
     /** The sample size. */
     private int sampleSize;
-    
+
     /**
      * Construct a new hypergeometric distribution with the given the population
      * size, the number of successes in the population, and the sample size.
@@ -71,12 +71,12 @@
     /**
      * For this distribution, X, this method returns P(X &le; x).
      * @param x the value at which the PDF is evaluated.
-     * @return PDF for this distribution. 
+     * @return PDF for this distribution.
      */
     @Override
     public double cumulativeProbability(int x) {
         double ret;
-        
+
         int n = getPopulationSize();
         int m = getNumberOfSuccesses();
         int k = getSampleSize();
@@ -89,7 +89,7 @@
         } else {
             ret = innerCumulativeProbability(domain[0], x, 1, n, m, k);
         }
-        
+
         return ret;
     }
 
@@ -99,7 +99,7 @@
      * @param m number of successes in the population.
      * @param k the sample size.
      * @return a two element array containing the lower and upper bounds of the
-     *         hypergeometric distribution.  
+     *         hypergeometric distribution.
      */
     private int[] getDomain(int n, int m, int k){
         return new int[]{
@@ -107,28 +107,28 @@
             getUpperDomain(m, k)
         };
     }
-    
+
     /**
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a PDF root.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
-     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code> 
+     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
      */
     @Override
     protected int getDomainLowerBound(double p) {
         return getLowerDomain(getPopulationSize(), getNumberOfSuccesses(),
             getSampleSize());
     }
-    
+
     /**
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a PDF root.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected int getDomainUpperBound(double p) {
@@ -141,7 +141,7 @@
      * @param n the population size.
      * @param m number of successes in the population.
      * @param k the sample size.
-     * @return the lowest domain value of the hypergeometric distribution.  
+     * @return the lowest domain value of the hypergeometric distribution.
      */
     private int getLowerDomain(int n, int m, int k) {
         return Math.max(0, m - (n - k));
@@ -176,7 +176,7 @@
      * parameters.
      * @param m number of successes in the population.
      * @param k the sample size.
-     * @return the highest domain value of the hypergeometric distribution.  
+     * @return the highest domain value of the hypergeometric distribution.
      */
     private int getUpperDomain(int m, int k){
         return Math.min(k, m);
@@ -184,13 +184,13 @@
 
     /**
      * For this distribution, X, this method returns P(X = x).
-     * 
+     *
      * @param x the value at which the PMF is evaluated.
-     * @return PMF for this distribution. 
+     * @return PMF for this distribution.
      */
     public double probability(int x) {
         double ret;
-        
+
         int n = getPopulationSize();
         int m = getNumberOfSuccesses();
         int k = getSampleSize();
@@ -201,19 +201,19 @@
         } else {
             ret = probability(n, m, k, x);
         }
-        
+
         return ret;
     }
-    
+
     /**
      * For the distribution, X, defined by the given hypergeometric distribution
      * parameters, this method returns P(X = x).
-     * 
+     *
      * @param n the population size.
      * @param m number of successes in the population.
      * @param k the sample size.
      * @param x the value at which the PMF is evaluated.
-     * @return PMF for the distribution. 
+     * @return PMF for the distribution.
      */
     private double probability(int n, int m, int k, int x) {
         return Math.exp(MathUtils.binomialCoefficientLog(m, x) +
@@ -248,7 +248,7 @@
         }
         populationSize = size;
     }
-    
+
     /**
      * Modify the sample size.
      * @param size the new sample size.
@@ -259,7 +259,7 @@
             throw MathRuntimeException.createIllegalArgumentException(
                   "sample size must be positive ({0})",
                   size);
-        }    
+        }
         sampleSize = size;
     }
 
@@ -271,7 +271,7 @@
      */
     public double upperCumulativeProbability(int x) {
         double ret;
-        
+
         int n = getPopulationSize();
         int m = getNumberOfSuccesses();
         int k = getSampleSize();
@@ -284,14 +284,14 @@
         } else {
             ret = innerCumulativeProbability(domain[1], x, -1, n, m, k);
         }
-        
+
         return ret;
     }
-    
+
     /**
      * For this distribution, X, this method returns P(x0 &le; X &le; x1).  This
      * probability is computed by summing the point probabilities for the values
-     * x0, x0 + 1, x0 + 2, ..., x1, in the order directed by dx. 
+     * x0, x0 + 1, x0 + 2, ..., x1, in the order directed by dx.
      * @param x0 the inclusive, lower bound
      * @param x1 the inclusive, upper bound
      * @param dx the direction of summation. 1 indicates summing from x0 to x1.
@@ -299,7 +299,7 @@
      * @param n the population size.
      * @param m number of successes in the population.
      * @param k the sample size.
-     * @return P(x0 &le; X &le; x1). 
+     * @return P(x0 &le; X &le; x1).
      */
     private double innerCumulativeProbability(
         int x0, int x1, int dx, int n, int m, int k)

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/IntegerDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/IntegerDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/IntegerDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/IntegerDistribution.java Sat Sep  5 17:36:48 2009
@@ -28,7 +28,7 @@
      * For a random variable X whose values are distributed according
      * to this distribution, this method returns P(X = x). In other words, this
      * method represents the probability mass function for the distribution.
-     * 
+     *
      * @param x the value at which the probability density function is evaluated.
      * @return the value of the probability density function at x
      */
@@ -39,25 +39,25 @@
      * to this distribution, this method returns P(X &le; x).  In other words,
      * this method represents the probability distribution function, or PDF
      * for the distribution.
-     * 
+     *
      * @param x the value at which the PDF is evaluated.
-     * @return PDF for this distribution. 
+     * @return PDF for this distribution.
      * @throws MathException if the cumulative probability can not be
      *            computed due to convergence or other numerical errors.
      */
     double cumulativeProbability(int x) throws MathException;
-    
+
     /**
      * For this distribution, X, this method returns P(x0 &le; X &le; x1).
      * @param x0 the inclusive, lower bound
      * @param x1 the inclusive, upper bound
-     * @return the cumulative probability. 
+     * @return the cumulative probability.
      * @throws MathException if the cumulative probability can not be
      *            computed due to convergence or other numerical errors.
      * @throws IllegalArgumentException if x0 > x1
      */
     double cumulativeProbability(int x0, int x1) throws MathException;
-    
+
     /**
      * For this distribution, X, this method returns the largest x such that
      * P(X &le; x) <= p.
@@ -66,14 +66,14 @@
      * <li> If there is a minimum value, <code>m</code>, with postive
      * probablility under (the density of) X, then <code>m - 1</code> is
      * returned by <code>inverseCumulativeProbability(0).</code>  If there is
-     * no such value <code>m,  Integer.MIN_VALUE</code> is 
+     * no such value <code>m,  Integer.MIN_VALUE</code> is
      * returned.</li>
      * <li> If there is a maximum value, <code>M</code>, such that
-     * P(X &le; M) =1, then <code>M</code> is returned by 
+     * P(X &le; M) =1, then <code>M</code> is returned by
      * <code>inverseCumulativeProbability(1).</code>
-     * If there is no such value, <code>M, Integer.MAX_VALUE</code> is 
+     * If there is no such value, <code>M, Integer.MAX_VALUE</code> is
      * returned.</li></ul></p>
-     * 
+     *
      * @param p the cumulative probability.
      * @return the largest x such that P(X &le; x) <= p
      * @throws MathException if the inverse cumulative probability can not be

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -30,9 +30,9 @@
  *
  * @version $Revision$ $Date$
  */
-public class NormalDistributionImpl extends AbstractContinuousDistribution 
+public class NormalDistributionImpl extends AbstractContinuousDistribution
         implements NormalDistribution, Serializable {
-    
+
     /** Serializable version identifier */
     private static final long serialVersionUID = 8589540077390120676L;
 
@@ -41,7 +41,7 @@
 
     /** The mean of this distribution. */
     private double mean = 0;
-    
+
     /** The standard deviation of this distribution. */
     private double standardDeviation = 1;
 
@@ -55,23 +55,23 @@
         setMean(mean);
         setStandardDeviation(sd);
     }
-    
+
     /**
      * Creates normal distribution with the mean equal to zero and standard
-     * deviation equal to one. 
+     * deviation equal to one.
      */
     public NormalDistributionImpl(){
         this(0.0, 1.0);
     }
-    
+
     /**
      * Access the mean.
      * @return mean for this distribution
-     */ 
+     */
     public double getMean() {
         return mean;
     }
-    
+
     /**
      * Modify the mean.
      * @param mean for this distribution
@@ -98,7 +98,7 @@
             throw MathRuntimeException.createIllegalArgumentException(
                   "standard deviation must be positive ({0})",
                   sd);
-        }       
+        }
         standardDeviation = sd;
     }
 
@@ -116,7 +116,7 @@
     /**
      * For this distribution, X, this method returns P(X &lt; <code>x</code>).
      * @param x the value at which the CDF is evaluated.
-     * @return CDF evaluted at <code>x</code>. 
+     * @return CDF evaluted at <code>x</code>.
      * @throws MathException if the algorithm fails to converge; unless
      * x is more than 20 standard deviations from the mean, in which case the
      * convergence exception is caught and 0 or 1 is returned.
@@ -135,12 +135,12 @@
             }
         }
     }
-    
+
     /**
      * For this distribution, X, this method returns the critical point x, such
      * that P(X &lt; x) = <code>p</code>.
      * <p>
-     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and 
+     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and
      * <code>Double.POSITIVE_INFINITY</code> for p=1.</p>
      *
      * @param p the desired probability
@@ -151,7 +151,7 @@
      *         probability.
      */
     @Override
-    public double inverseCumulativeProbability(final double p) 
+    public double inverseCumulativeProbability(final double p)
     throws MathException {
         if (p == 0) {
             return Double.NEGATIVE_INFINITY;
@@ -161,15 +161,15 @@
         }
         return super.inverseCumulativeProbability(p);
     }
-    
+
     /**
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
-     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code> 
+     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
      */
     @Override
     protected double getDomainLowerBound(double p) {
@@ -180,7 +180,7 @@
         } else {
             ret = getMean();
         }
-        
+
         return ret;
     }
 
@@ -188,10 +188,10 @@
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected double getDomainUpperBound(double p) {
@@ -202,7 +202,7 @@
         } else {
             ret = Double.MAX_VALUE;
         }
-        
+
         return ret;
     }
 
@@ -210,7 +210,7 @@
      * Access the initial domain value, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return initial domain value
      */
@@ -225,7 +225,7 @@
         } else {
             ret = getMean();
         }
-        
+
         return ret;
     }
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistribution.java Sat Sep  5 17:36:48 2009
@@ -20,7 +20,7 @@
  * The Pascal distribution.  The Pascal distribution is a special case of the
  * Negative Binomial distribution where the number of successes parameter is an
  * integer.
- * 
+ *
  * There are various ways to express the probability mass and distribution
  * functions for the Pascal distribution.  The convention employed by the
  * library is to express these functions in terms of the number of failures in
@@ -41,29 +41,29 @@
 public interface PascalDistribution extends IntegerDistribution {
     /**
      * Access the number of successes for this distribution.
-     * 
+     *
      * @return the number of successes
      */
     int getNumberOfSuccesses();
-    
+
     /**
      * Access the probability of success for this distribution.
-     * 
+     *
      * @return the probability of success
      */
     double getProbabilityOfSuccess();
-    
+
     /**
      * Change the number of successes for this distribution.
-     * 
+     *
      * @param successes the new number of successes
      */
     void setNumberOfSuccesses(int successes);
-    
+
     /**
      * Change the probability of success for this distribution.
-     * 
+     *
      * @param p the new probability of success
      */
     void setProbabilityOfSuccess(double p);
-}
\ No newline at end of file
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistribution.java Sat Sep  5 17:36:48 2009
@@ -20,7 +20,7 @@
 
 /**
  * Interface representing the Poisson Distribution.
- * 
+ *
  * <p>
  * References:
  * <ul>
@@ -28,23 +28,23 @@
  * Poisson distribution</a></li>
  * </ul>
  * </p>
- * 
+ *
  * @version $Revision$ $Date$
  */
 public interface PoissonDistribution extends IntegerDistribution {
 
     /**
      * Get the mean for the distribution.
-     * 
+     *
      * @return the mean for the distribution.
      */
     public double getMean();
 
     /**
      * Set the mean for the distribution.
-     * The parameter value must be positive; otherwise an 
+     * The parameter value must be positive; otherwise an
      * <code>IllegalArgument</code> is thrown.
-     * 
+     *
      * @param p the mean
      * @throws IllegalArgumentException if p &le; 0
      */
@@ -52,10 +52,10 @@
 
     /**
      * Calculates the Poisson distribution function using a normal approximation.
-     * 
+     *
      * @param x the upper bound, inclusive
      * @return the distribution function value calculated using a normal approximation
      * @throws MathException if an error occurs computing the normal approximation
      */
     public double normalApproximateProbability(int x) throws MathException;
-}
\ No newline at end of file
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -25,7 +25,7 @@
 
 /**
  * Implementation for the {@link PoissonDistribution}.
- * 
+ *
  * @version $Revision$ $Date$
  */
 public class PoissonDistributionImpl extends AbstractIntegerDistribution
@@ -36,7 +36,7 @@
 
     /** Distribution used to compute normal approximation. */
     private NormalDistribution normal;
-    
+
     /**
      * Holds the Poisson mean for the distribution.
      */
@@ -44,9 +44,9 @@
 
     /**
      * Create a new Poisson distribution with the given the mean.
-     * The mean value must be positive; otherwise an 
+     * The mean value must be positive; otherwise an
      * <code>IllegalArgument</code> is thrown.
-     * 
+     *
      * @param p the Poisson mean
      * @throws IllegalArgumentException if p &le; 0
      */
@@ -56,9 +56,9 @@
 
     /**
      * Create a new Poisson distribution with the given the mean.
-     * The mean value must be positive; otherwise an 
+     * The mean value must be positive; otherwise an
      * <code>IllegalArgument</code> is thrown.
-     * 
+     *
      * @param p the Poisson mean
      * @param z a normal distribution used to compute normal approximations.
      * @throws IllegalArgumentException if p &le; 0
@@ -72,7 +72,7 @@
 
     /**
      * Get the Poisson mean for the distribution.
-     * 
+     *
      * @return the Poisson mean for the distribution.
      */
     public double getMean() {
@@ -81,9 +81,9 @@
 
     /**
      * Set the Poisson mean for the distribution.
-     * The mean value must be positive; otherwise an 
+     * The mean value must be positive; otherwise an
      * <code>IllegalArgument</code> is thrown.
-     * 
+     *
      * @param p the Poisson mean value
      * @throws IllegalArgumentException if p &le; 0
      */
@@ -100,7 +100,7 @@
 
     /**
      * The probability mass function P(X = x) for a Poisson distribution.
-     * 
+     *
      * @param x the value at which the probability density function is evaluated.
      * @return the value of the probability mass function at x
      */
@@ -108,13 +108,13 @@
         if (x < 0 || x == Integer.MAX_VALUE) {
             return 0;
         }
-        return Math.pow(getMean(), x) / 
+        return Math.pow(getMean(), x) /
             MathUtils.factorialDouble(x) * Math.exp(-mean);
     }
-    
+
     /**
      * The probability distribution function P(X <= x) for a Poisson distribution.
-     * 
+     *
      * @param x the value at which the PDF is evaluated.
      * @return Poisson distribution function evaluated at x
      * @throws MathException if the cumulative probability can not be
@@ -128,7 +128,7 @@
         if (x == Integer.MAX_VALUE) {
             return 1;
         }
-        return Gamma.regularizedGammaQ((double)x + 1, mean, 
+        return Gamma.regularizedGammaQ((double)x + 1, mean,
                 1E-12, Integer.MAX_VALUE);
     }
 
@@ -139,7 +139,7 @@
      * <p>
      * The computation uses "half-correction" -- evaluating the normal
      * distribution function at <code>x + 0.5</code></p>
-     * 
+     *
      * @param x the upper bound, inclusive
      * @return the distribution function value calculated using a normal approximation
      * @throws MathException if an error occurs computing the normal approximation
@@ -153,7 +153,7 @@
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain lower bound
      */
@@ -166,7 +166,7 @@
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain upper bound
      */
@@ -174,7 +174,7 @@
     protected int getDomainUpperBound(double p) {
         return Integer.MAX_VALUE;
     }
-    
+
     /**
      * Modify the normal distribution used to compute normal approximations.
      * The caller is responsible for insuring the normal distribution has the
@@ -185,5 +185,5 @@
     public void setNormal(NormalDistribution value) {
         normal = value;
     }
-    
-}
\ No newline at end of file
+
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistribution.java Sat Sep  5 17:36:48 2009
@@ -35,7 +35,7 @@
      * @param degreesOfFreedom the new degrees of freedom.
      */
     void setDegreesOfFreedom(double degreesOfFreedom);
-    
+
     /**
      * Access the degrees of freedom.
      * @return the degrees of freedom.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -34,7 +34,7 @@
 
     /** Serializable version identifier */
     private static final long serialVersionUID = -5852615386664158222L;
-    
+
     /** The degrees of freedom*/
     private double degreesOfFreedom;
 
@@ -71,7 +71,7 @@
     /**
      * For this distribution, X, this method returns P(X &lt; <code>x</code>).
      * @param x the value at which the CDF is evaluated.
-     * @return CDF evaluted at <code>x</code>. 
+     * @return CDF evaluted at <code>x</code>.
      * @throws MathException if the cumulative probability can not be
      *            computed due to convergence or other numerical errors.
      */
@@ -94,12 +94,12 @@
 
         return ret;
     }
-    
+
     /**
      * For this distribution, X, this method returns the critical point x, such
      * that P(X &lt; x) = <code>p</code>.
      * <p>
-     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and 
+     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and
      * <code>Double.POSITIVE_INFINITY</code> for p=1.</p>
      *
      * @param p the desired probability
@@ -110,7 +110,7 @@
      *         probability.
      */
     @Override
-    public double inverseCumulativeProbability(final double p) 
+    public double inverseCumulativeProbability(final double p)
     throws MathException {
         if (p == 0) {
             return Double.NEGATIVE_INFINITY;
@@ -125,10 +125,10 @@
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
-     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code> 
+     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
      */
     @Override
     protected double getDomainLowerBound(double p) {
@@ -139,10 +139,10 @@
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected double getDomainUpperBound(double p) {
@@ -153,7 +153,7 @@
      * Access the initial domain value, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return initial domain value
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistribution.java Sat Sep  5 17:36:48 2009
@@ -41,19 +41,19 @@
      * @return the shape parameter.
      */
     double getShape();
-    
+
     /**
      * Access the scale parameter.
      * @return the scale parameter.
      */
     double getScale();
-    
+
     /**
      * Modify the shape parameter.
      * @param alpha The new shape parameter value.
      */
     void setShape(double alpha);
-    
+
     /**
      * Modify the scale parameter.
      * @param beta The new scale parameter value.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -30,16 +30,16 @@
  */
 public class WeibullDistributionImpl extends AbstractContinuousDistribution
         implements WeibullDistribution, Serializable {
-    
+
     /** Serializable version identifier */
     private static final long serialVersionUID = 8589540077390120676L;
-    
+
     /** The shape parameter. */
     private double shape;
-    
+
     /** The scale parameter. */
     private double scale;
-    
+
     /**
      * Creates weibull distribution with the given shape and scale and a
      * location equal to zero.
@@ -55,7 +55,7 @@
     /**
      * For this distribution, X, this method returns P(X &lt; <code>x</code>).
      * @param x the value at which the CDF is evaluated.
-     * @return CDF evaluted at <code>x</code>. 
+     * @return CDF evaluted at <code>x</code>.
      */
     public double cumulativeProbability(double x) {
         double ret;
@@ -74,7 +74,7 @@
     public double getShape() {
         return shape;
     }
-    
+
     /**
      * Access the scale parameter.
      * @return the scale parameter.
@@ -82,12 +82,12 @@
     public double getScale() {
         return scale;
     }
-    
+
     /**
      * For this distribution, X, this method returns the critical point x, such
      * that P(X &lt; x) = <code>p</code>.
      * <p>
-     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and 
+     * Returns <code>Double.NEGATIVE_INFINITY</code> for p=0 and
      * <code>Double.POSITIVE_INFINITY</code> for p=1.</p>
      *
      * @param p the desired probability
@@ -110,7 +110,7 @@
         }
         return ret;
     }
-    
+
     /**
      * Modify the shape parameter.
      * @param alpha the new shape parameter value.
@@ -120,10 +120,10 @@
             throw MathRuntimeException.createIllegalArgumentException(
                   "shape must be positive ({0})",
                   alpha);
-        }       
+        }
         this.shape = alpha;
     }
-    
+
     /**
      * Modify the scale parameter.
      * @param beta the new scale parameter value.
@@ -133,7 +133,7 @@
             throw MathRuntimeException.createIllegalArgumentException(
                   "scale must be positive ({0})",
                   beta);
-        }       
+        }
         this.scale = beta;
     }
 
@@ -141,10 +141,10 @@
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
-     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code> 
+     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
      */
     @Override
     protected double getDomainLowerBound(double p) {
@@ -155,10 +155,10 @@
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected double getDomainUpperBound(double p) {
@@ -169,7 +169,7 @@
      * Access the initial domain value, based on <code>p</code>, used to
      * bracket a CDF root.  This method is used by
      * {@link #inverseCumulativeProbability(double)} to find critical values.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return initial domain value
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistribution.java Sat Sep  5 17:36:48 2009
@@ -22,26 +22,26 @@
  * <p>
  * References:
  * <ul>
- * <li><a href="http://mathworld.wolfram.com/ZipfDistribution.html">Zipf 
+ * <li><a href="http://mathworld.wolfram.com/ZipfDistribution.html">Zipf
  * Distribution</a></li>
  * </ul>
  * </p>
- * 
+ *
  * @version $Revision$ $Date$
  */
 public interface ZipfDistribution extends IntegerDistribution {
     /**
      * Get the number of elements (e.g. corpus size) for the distribution.
-     * 
+     *
      * @return the number of elements
      */
     public int getNumberOfElements();
 
     /**
      * Set the number of elements (e.g. corpus size) for the distribution.
-     * The parameter value must be positive; otherwise an 
+     * The parameter value must be positive; otherwise an
      * <code>IllegalArgumentException</code> is thrown.
-     * 
+     *
      * @param n the number of elements
      * @throws IllegalArgumentException if n &le; 0
      */
@@ -49,18 +49,18 @@
 
     /**
      * Get the exponent characterising the distribution.
-     * 
+     *
      * @return the exponent
      */
     public double getExponent();
 
     /**
      * Set the exponent characterising the distribution.
-     * The parameter value must be positive; otherwise an 
+     * The parameter value must be positive; otherwise an
      * <code>IllegalArgumentException</code> is thrown.
-     * 
+     *
      * @param s the exponent
      * @throws IllegalArgumentException if s &le; 0.0
      */
     public void setExponent(double s);
-}
\ No newline at end of file
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java Sat Sep  5 17:36:48 2009
@@ -23,10 +23,10 @@
 
 /**
  * Implementation for the {@link ZipfDistribution}.
- * 
+ *
  * @version $Revision$ $Date$
  */
-public class ZipfDistributionImpl extends AbstractIntegerDistribution 
+public class ZipfDistributionImpl extends AbstractIntegerDistribution
     implements ZipfDistribution, Serializable {
 
     /** Serializable version identifier. */
@@ -39,10 +39,10 @@
     private double exponent;
 
     /**
-     * Create a new Zipf distribution with the given number of elements and 
-     * exponent. Both values must be positive; otherwise an 
+     * Create a new Zipf distribution with the given number of elements and
+     * exponent. Both values must be positive; otherwise an
      * <code>IllegalArgumentException</code> is thrown.
-     * 
+     *
      * @param numberOfElements the number of elements
      * @param exponent the exponent
      * @exception IllegalArgumentException if n &le; 0 or s &le; 0.0
@@ -55,7 +55,7 @@
 
     /**
      * Get the number of elements (e.g. corpus size) for the distribution.
-     * 
+     *
      * @return the number of elements
      */
     public int getNumberOfElements() {
@@ -64,9 +64,9 @@
 
     /**
      * Set the number of elements (e.g. corpus size) for the distribution.
-     * The parameter value must be positive; otherwise an 
+     * The parameter value must be positive; otherwise an
      * <code>IllegalArgumentException</code> is thrown.
-     * 
+     *
      * @param n the number of elements
      * @exception IllegalArgumentException if n &le; 0
      */
@@ -79,10 +79,10 @@
         }
         this.numberOfElements = n;
     }
-    
+
     /**
      * Get the exponent characterising the distribution.
-     * 
+     *
      * @return the exponent
      */
     public double getExponent() {
@@ -91,9 +91,9 @@
 
     /**
      * Set the exponent characterising the distribution.
-     * The parameter value must be positive; otherwise an 
+     * The parameter value must be positive; otherwise an
      * <code>IllegalArgumentException</code> is thrown.
-     * 
+     *
      * @param s the exponent
      * @exception IllegalArgumentException if s &le; 0.0
      */
@@ -109,7 +109,7 @@
 
     /**
      * The probability mass function P(X = x) for a Zipf distribution.
-     * 
+     *
      * @param x the value at which the probability density function is evaluated.
      * @return the value of the probability mass function at x
      */
@@ -121,10 +121,10 @@
         return (1.0 / Math.pow(x, exponent)) / generalizedHarmonic(numberOfElements, exponent);
 
     }
-    
+
     /**
      * The probability distribution function P(X <= x) for a Zipf distribution.
-     * 
+     *
      * @param x the value at which the PDF is evaluated.
      * @return Zipf distribution function evaluated at x
      */
@@ -143,10 +143,10 @@
     /**
      * Access the domain value lower bound, based on <code>p</code>, used to
      * bracket a PDF root.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value lower bound, i.e.
-     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code> 
+     *         P(X &lt; <i>lower bound</i>) &lt; <code>p</code>
      */
     @Override
     protected int getDomainLowerBound(final double p) {
@@ -156,10 +156,10 @@
     /**
      * Access the domain value upper bound, based on <code>p</code>, used to
      * bracket a PDF root.
-     * 
+     *
      * @param p the desired probability for the critical value
      * @return domain value upper bound, i.e.
-     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code> 
+     *         P(X &lt; <i>upper bound</i>) &gt; <code>p</code>
      */
     @Override
     protected int getDomainUpperBound(final double p) {
@@ -168,10 +168,10 @@
 
 
     /**
-     * Calculates the Nth generalized harmonic number. See 
-     * <a href="http://mathworld.wolfram.com/HarmonicSeries.html">Harmonic 
+     * Calculates the Nth generalized harmonic number. See
+     * <a href="http://mathworld.wolfram.com/HarmonicSeries.html">Harmonic
      * Series</a>.
-     * 
+     *
      * @param n the term in the series to calculate (must be &ge; 1)
      * @param m the exponent; special case m == 1.0 is the harmonic series
      * @return the nth generalized harmonic number

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/AbstractEstimator.java Sat Sep  5 17:36:48 2009
@@ -51,7 +51,7 @@
 
     /**
      * Set the maximal number of cost evaluations allowed.
-     * 
+     *
      * @param maxCostEval maximal number of cost evaluations allowed
      * @see #estimate
      */
@@ -61,23 +61,23 @@
 
     /**
      * Get the number of cost evaluations.
-     * 
+     *
      * @return number of cost evaluations
      * */
     public final int getCostEvaluations() {
         return costEvaluations;
     }
 
-    /** 
+    /**
      * Get the number of jacobian evaluations.
-     * 
+     *
      * @return number of jacobian evaluations
      * */
     public final int getJacobianEvaluations() {
         return jacobianEvaluations;
     }
 
-    /** 
+    /**
      * Update the jacobian matrix.
      */
     protected void updateJacobian() {
@@ -99,7 +99,7 @@
       ++jacobianEvaluations;
     }
 
-    /** 
+    /**
      * Update the residuals array and cost function value.
      * @exception EstimationException if the number of cost evaluations
      * exceeds the maximum allowed
@@ -123,14 +123,14 @@
 
     }
 
-    /** 
+    /**
      * Get the Root Mean Square value.
      * Get the Root Mean Square value, i.e. the root of the arithmetic
      * mean of the square of all weighted residuals. This is related to the
      * criterion that is minimized by the estimator as follows: if
      * <em>c</em> if the criterion, and <em>n</em> is the number of
      * measurements, then the RMS is <em>sqrt (c/n)</em>.
-     * 
+     *
      * @param problem estimation problem
      * @return RMS value
      */
@@ -168,7 +168,7 @@
      */
     public double[][] getCovariances(EstimationProblem problem)
       throws EstimationException {
- 
+
         // set up the jacobian
         updateJacobian();
 
@@ -253,7 +253,7 @@
 
     }
 
-    /** 
+    /**
      * Solve an estimation problem.
      *
      * <p>The method should set the parameters of the problem to several
@@ -276,7 +276,7 @@
     /** Array of parameters. */
     protected EstimatedParameter[] parameters;
 
-    /** 
+    /**
      * Jacobian matrix.
      * <p>This matrix is in canonical form just after the calls to
      * {@link #updateJacobian()}, but may be modified by the solver
@@ -311,4 +311,4 @@
     /** Number of jacobian evaluations. */
     private int jacobianEvaluations;
 
-}
\ No newline at end of file
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationException.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationException.java Sat Sep  5 17:36:48 2009
@@ -19,7 +19,7 @@
 
 import org.apache.commons.math.MathException;
 
-/** 
+/**
  * This class represents exceptions thrown by the estimation solvers.
  *
  * @version $Revision$ $Date$
@@ -35,7 +35,7 @@
     /** Serializable version identifier. */
     private static final long serialVersionUID = -573038581493881337L;
 
-    /** 
+    /**
      * Simple constructor.
      * Build an exception by translating and formating a message
      * @param specifier format specifier (to be translated)

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/EstimationProblem.java Sat Sep  5 17:36:48 2009
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.estimation;
 
-/** 
+/**
  * This interface represents an estimation problem.
  *
  * <p>This interface should be implemented by all real estimation
@@ -46,19 +46,19 @@
  */
 @Deprecated
 public interface EstimationProblem {
-  /** 
+  /**
    * Get the measurements of an estimation problem.
    * @return measurements
    */
   public WeightedMeasurement[] getMeasurements();
 
-  /** 
+  /**
    * Get the unbound parameters of the problem.
    * @return unbound parameters
    */
   public EstimatedParameter[] getUnboundParameters();
 
-  /** 
+  /**
    * Get all the parameters of the problem.
    * @return parameters
    */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/Estimator.java Sat Sep  5 17:36:48 2009
@@ -39,7 +39,7 @@
 @Deprecated
 public interface Estimator {
 
-  /** 
+  /**
    * Solve an estimation problem.
    *
    * <p>The method should set the parameters of the problem to several
@@ -56,7 +56,7 @@
   public void estimate(EstimationProblem problem)
     throws EstimationException;
 
-  /** 
+  /**
    * Get the Root Mean Square value.
    * Get the Root Mean Square value, i.e. the root of the arithmetic
    * mean of the square of all weighted residuals. This is related to the
@@ -64,7 +64,7 @@
    * <em>c</em> is the criterion, and <em>n</em> is the number of
    * measurements, then the RMS is <em>sqrt (c/n)</em>.
    * @see #guessParametersErrors(EstimationProblem)
-   * 
+   *
    * @param problem estimation problem
    * @return RMS value
    */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java Sat Sep  5 17:36:48 2009
@@ -26,7 +26,7 @@
 import org.apache.commons.math.linear.RealVector;
 import org.apache.commons.math.linear.ArrayRealVector;
 
-/** 
+/**
  * This class implements a solver for estimation problems.
  *
  * <p>This class solves estimation problems using a weighted least
@@ -67,10 +67,10 @@
      */
     public GaussNewtonEstimator() {
         this.steadyStateThreshold = DEFAULT_STEADY_STATE_THRESHOLD;
-        this.convergence          = DEFAULT_CONVERGENCE;        
+        this.convergence          = DEFAULT_CONVERGENCE;
     }
 
-    /** 
+    /**
      * Simple constructor.
      *
      * <p>This constructor builds an estimator and stores its convergence
@@ -132,7 +132,7 @@
         this.steadyStateThreshold = steadyStateThreshold;
     }
 
-    /** 
+    /**
      * Solve an estimation problem using a least squares criterion.
      *
      * <p>This method set the unbound parameters of the given problem

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java Sat Sep  5 17:36:48 2009
@@ -20,7 +20,7 @@
 import java.util.Arrays;
 
 
-/** 
+/**
  * This class solves a least squares problem.
  *
  * <p>This implementation <em>should</em> work even for over-determined systems
@@ -101,7 +101,7 @@
 @Deprecated
 public class LevenbergMarquardtEstimator extends AbstractEstimator implements Serializable {
 
-  /** 
+  /**
    * Build an estimator for least squares problems.
    * <p>The default values for the algorithm settings are:
    *   <ul>
@@ -126,12 +126,12 @@
 
   }
 
-  /** 
+  /**
    * Set the positive input variable used in determining the initial step bound.
    * This bound is set to the product of initialStepBoundFactor and the euclidean norm of diag*x if nonzero,
    * or else to initialStepBoundFactor itself. In most cases factor should lie
    * in the interval (0.1, 100.0). 100.0 is a generally recommended value
-   * 
+   *
    * @param initialStepBoundFactor initial step bound factor
    * @see #estimate
    */
@@ -139,9 +139,9 @@
     this.initialStepBoundFactor = initialStepBoundFactor;
   }
 
-  /** 
+  /**
    * Set the desired relative error in the sum of squares.
-   * 
+   *
    * @param costRelativeTolerance desired relative error in the sum of squares
    * @see #estimate
    */
@@ -149,9 +149,9 @@
     this.costRelativeTolerance = costRelativeTolerance;
   }
 
-  /** 
+  /**
    * Set the desired relative error in the approximate solution parameters.
-   * 
+   *
    * @param parRelativeTolerance desired relative error
    * in the approximate solution parameters
    * @see #estimate
@@ -160,9 +160,9 @@
     this.parRelativeTolerance = parRelativeTolerance;
   }
 
-  /** 
+  /**
    * Set the desired max cosine on the orthogonality.
-   * 
+   *
    * @param orthoTolerance desired max cosine on the orthogonality
    * between the function vector and the columns of the jacobian
    * @see #estimate
@@ -171,7 +171,7 @@
     this.orthoTolerance = orthoTolerance;
   }
 
-  /** 
+  /**
    * Solve an estimation problem using the Levenberg-Marquardt algorithm.
    * <p>The algorithm used is a modified Levenberg-Marquardt one, based
    * on the MINPACK <a href="http://www.netlib.org/minpack/lmder.f">lmder</a>
@@ -189,7 +189,7 @@
    *   <li>Jorge   J. More</li>
    *   </ul>
    * <p>Luc Maisonobe did the Java translation.</p>
-   * 
+   *
    * @param problem estimation problem to solve
    * @exception EstimationException if convergence cannot be
    * reached with the specified algorithm settings or if there are more variables
@@ -224,7 +224,7 @@
 
     // evaluate the function at the starting point and calculate its norm
     updateResidualsAndCost();
-    
+
     // outer loop
     lmPar = 0;
     boolean firstIteration = true;
@@ -259,10 +259,10 @@
           diag[k] = dk;
         }
         xNorm = Math.sqrt(xNorm);
-        
+
         // initialize the step bound delta
         delta = (xNorm == 0) ? initialStepBoundFactor : (initialStepBoundFactor * xNorm);
- 
+
       }
 
       // check orthogonality between function vector and jacobian columns
@@ -301,7 +301,7 @@
         double[] tmpVec = residuals;
         residuals = oldRes;
         oldRes    = tmpVec;
-        
+
         // determine the Levenberg-Marquardt parameter
         determineLMParameter(oldRes, delta, diag, work1, work2, work3);
 
@@ -389,7 +389,7 @@
           residuals = oldRes;
           oldRes    = tmpVec;
         }
-   
+
         // tests for convergence.
         if (((Math.abs(actRed) <= costRelativeTolerance) &&
              (preRed <= costRelativeTolerance) &&
@@ -422,7 +422,7 @@
 
   }
 
-  /** 
+  /**
    * Determine the Levenberg-Marquardt parameter.
    * <p>This implementation is a translation in Java of the MINPACK
    * <a href="http://www.netlib.org/minpack/lmpar.f">lmpar</a>
@@ -436,7 +436,7 @@
    *   <li>Jorge   J. More</li>
    * </ul>
    * <p>Luc Maisonobe did the Java translation.</p>
-   * 
+   *
    * @param qy array containing qTy
    * @param delta upper bound on the euclidean norm of diagR * lmDir
    * @param diag diagonal matrix
@@ -487,7 +487,7 @@
     if (rank == solvedCols) {
       for (int j = 0; j < solvedCols; ++j) {
         int pj = permutation[j];
-        work1[pj] *= diag[pj] / dxNorm; 
+        work1[pj] *= diag[pj] / dxNorm;
       }
       sum2 = 0;
       for (int j = 0; j < solvedCols; ++j) {
@@ -558,11 +558,11 @@
           ((parl == 0) && (fp <= previousFP) && (previousFP < 0))) {
         return;
       }
- 
+
       // compute the Newton correction
       for (int j = 0; j < solvedCols; ++j) {
        int pj = permutation[j];
-        work1[pj] = work3[pj] * diag[pj] / dxNorm; 
+        work1[pj] = work3[pj] * diag[pj] / dxNorm;
       }
       for (int j = 0; j < solvedCols; ++j) {
         int pj = permutation[j];
@@ -592,7 +592,7 @@
     }
   }
 
-  /** 
+  /**
    * Solve a*x = b and d*x = 0 in the least squares sense.
    * <p>This implementation is a translation in Java of the MINPACK
    * <a href="http://www.netlib.org/minpack/qrsolv.f">qrsolv</a>
@@ -606,7 +606,7 @@
    *   <li>Jorge   J. More</li>
    * </ul>
    * <p>Luc Maisonobe did the Java translation.</p>
-   * 
+   *
    * @param qy array containing qTy
    * @param diag diagonal matrix
    * @param lmDiag diagonal elements associated with lmDir
@@ -716,7 +716,7 @@
 
   }
 
-  /** 
+  /**
    * Decompose a matrix A as A.P = Q.R using Householder transforms.
    * <p>As suggested in the P. Lascaux and R. Theodor book
    * <i>Analyse num&eacute;rique matricielle appliqu&eacute;e &agrave;
@@ -812,9 +812,9 @@
 
   }
 
-  /** 
+  /**
    * Compute the product Qt.y for some Q.R. decomposition.
-   * 
+   *
    * @param y vector to multiply (will be overwritten with the result)
    */
   private void qTy(double[] y) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java Sat Sep  5 17:36:48 2009
@@ -52,7 +52,7 @@
         measurements = new ArrayList<WeightedMeasurement>();
     }
 
-    /** 
+    /**
      * Get all the parameters of the problem.
      * @return parameters
      */
@@ -60,7 +60,7 @@
         return parameters.toArray(new EstimatedParameter[parameters.size()]);
     }
 
-    /** 
+    /**
      * Get the unbound parameters of the problem.
      * @return unbound parameters
      */
@@ -76,10 +76,10 @@
 
         // convert to an array
         return unbound.toArray(new EstimatedParameter[unbound.size()]);
-        
+
     }
 
-    /** 
+    /**
      * Get the measurements of an estimation problem.
      * @return measurements
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/estimation/WeightedMeasurement.java Sat Sep  5 17:36:48 2009
@@ -19,7 +19,7 @@
 
 import java.io.Serializable;
 
-/** 
+/**
  * This class represents measurements in estimation problems.
  *
  * <p>This abstract class implements all the methods needed to handle
@@ -56,7 +56,7 @@
     /** Serializable version identifier. */
     private static final long serialVersionUID = 4360046376796901941L;
 
-    /** 
+    /**
    * Simple constructor.
    * Build a measurement with the given parameters, and set its ignore
    * flag to false.
@@ -64,7 +64,7 @@
    * (two common choices are either to use 1.0 for all measurements, or to
    * use a value proportional to the inverse of the variance of the measurement
    * type)
-   * 
+   *
    * @param measuredValue measured value
    */
   public WeightedMeasurement(double weight, double measuredValue) {
@@ -74,9 +74,9 @@
   }
 
   /** Simple constructor.
-   * 
+   *
    * Build a measurement with the given parameters
-   * 
+   *
    * @param weight weight of the measurement in the least squares problem
    * @param measuredValue measured value
    * @param ignored true if the measurement should be ignored
@@ -88,51 +88,51 @@
     this.ignored       = ignored;
   }
 
-  /** 
+  /**
    * Get the weight of the measurement in the least squares problem
-   * 
+   *
    * @return weight
    */
   public double getWeight() {
     return weight;
   }
 
-  /** 
+  /**
    * Get the measured value
-   * 
+   *
    * @return measured value
    */
   public double getMeasuredValue() {
     return measuredValue;
   }
 
-  /** 
+  /**
    * Get the residual for this measurement
    * The residual is the measured value minus the theoretical value.
-   * 
+   *
    * @return residual
    */
   public double getResidual() {
     return measuredValue - getTheoreticalValue();
   }
 
-  /** 
+  /**
    * Get the theoretical value expected for this measurement
    * <p>The theoretical value is the value expected for this measurement
    * if the model and its parameter were all perfectly known.</p>
    * <p>The value must be computed using the current estimate of the parameters
    * set by the solver in the problem.</p>
-   * 
+   *
    * @return theoretical value
    */
   public abstract double getTheoreticalValue();
 
-  /** 
+  /**
    * Get the partial derivative of the {@link #getTheoreticalValue
    * theoretical value} according to the parameter.
    * <p>The value must be computed using the current estimate of the parameters
    * set by the solver in the problem.</p>
-   * 
+   *
    * @param parameter parameter against which the partial derivative
    * should be computed
    * @return partial derivative of the {@link #getTheoreticalValue
@@ -140,20 +140,20 @@
    */
   public abstract double getPartial(EstimatedParameter parameter);
 
-  /** 
+  /**
    * Set the ignore flag to the specified value
    * Setting the ignore flag to true allow to reject wrong
    * measurements, which sometimes can be detected only rather late.
-   * 
+   *
    * @param ignored value for the ignore flag
    */
   public void setIgnored(boolean ignored) {
     this.ignored = ignored;
   }
 
-  /** 
+  /**
    * Check if this measurement should be ignored
-   * 
+   *
    * @return true if the measurement should be ignored
    */
   public boolean isIgnored() {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/AbstractFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/AbstractFormat.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/AbstractFormat.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/AbstractFormat.java Sat Sep  5 17:36:48 2009
@@ -43,7 +43,7 @@
 
     /**
      * Create an improper formatting instance with the default number format
-     * for the numerator and denominator.  
+     * for the numerator and denominator.
      */
     protected AbstractFormat() {
         this(getDefaultNumberFormat());
@@ -73,7 +73,7 @@
     /**
      * Create a default number format.  The default number format is based on
      * {@link NumberFormat#getNumberInstance(java.util.Locale)} with the only
-     * customizing is the maximum number of BigFraction digits, which is set to 0.  
+     * customizing is the maximum number of BigFraction digits, which is set to 0.
      * @return the default number format.
      */
     protected static NumberFormat getDefaultNumberFormat() {
@@ -83,7 +83,7 @@
     /**
      * Create a default number format.  The default number format is based on
      * {@link NumberFormat#getNumberInstance(java.util.Locale)} with the only
-     * customizing is the maximum number of BigFraction digits, which is set to 0.  
+     * customizing is the maximum number of BigFraction digits, which is set to 0.
      * @param locale the specific locale used by the format.
      * @return the default number format specific to the given locale.
      */
@@ -168,17 +168,17 @@
                  c = source.charAt(index++);
              } while (Character.isWhitespace(c) && index < n);
              pos.setIndex(index);
-         
+
              if (index < n) {
                  ret = c;
              }
          }
-         
+
          return ret;
     }
 
     /**
-     * Formats a double value as a fraction and appends the result to a StringBuffer. 
+     * Formats a double value as a fraction and appends the result to a StringBuffer.
      *
      * @param value the double value to format
      * @param buffer StringBuffer to append to
@@ -193,9 +193,9 @@
         return format(Double.valueOf(value), buffer, position);
     }
 
-    
+
     /**
-     * Formats a long value as a fraction and appends the result to a StringBuffer. 
+     * Formats a long value as a fraction and appends the result to a StringBuffer.
      *
      * @param value the long value to format
      * @param buffer StringBuffer to append to
@@ -210,4 +210,4 @@
         return format(Long.valueOf(value), buffer, position);
     }
 
-}
\ No newline at end of file
+}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFraction.java Sat Sep  5 17:36:48 2009
@@ -27,7 +27,7 @@
 /**
  * Representation of a rational number without any overflow. This class is
  * immutable.
- * 
+ *
  * @version $Revision$ $Date$
  * @since 2.0
  */
@@ -94,11 +94,11 @@
      * Creates a <code>BigFraction</code> instance with the 2 parts of a fraction
      * Y/Z.
      * </p>
-     * 
+     *
      * <p>
      * Any negative signs are resolved to be on the numerator.
      * </p>
-     * 
+     *
      * @param numerator
      *            the numerator, for example the three in 'three sevenths'.
      * @param denominator
@@ -122,7 +122,7 @@
      * Create a {@link BigFraction} equivalent to the passed <tt>BigInteger</tt>, ie
      * "num / 1".
      * </p>
-     * 
+     *
      * @param num
      *            the numerator.
      */
@@ -135,7 +135,7 @@
      * Create a {@link BigFraction} given the numerator and denominator as
      * <code>BigInteger</code>. The {@link BigFraction} is reduced to lowest terms.
      * </p>
-     * 
+     *
      * @param num
      *            the numerator, must not be <code>null</code>.
      * @param den
@@ -246,7 +246,7 @@
      * Continued Fraction</a> equations (11) and (22)-(26)</li>
      * </ul>
      * </p>
-     * 
+     *
      * @param value
      *            the double value to convert to a fraction.
      * @param epsilon
@@ -268,7 +268,7 @@
      * Create a fraction given the double value and either the maximum error
      * allowed or the maximum number of denominator digits.
      * <p>
-     * 
+     *
      * NOTE: This constructor is called with EITHER - a valid epsilon value and
      * the maxDenominator set to Integer.MAX_VALUE (that way the maxDenominator
      * has no effect). OR - a valid maxDenominator value and the epsilon value
@@ -276,16 +276,16 @@
      * before the maxDenominator value is reached).
      * </p>
      * <p>
-     * 
+     *
      * It has been done this way so that the same code can be (re)used for both
      * scenarios. However this could be confusing to users if it were part of
      * the public API and this constructor should therefore remain PRIVATE.
      * </p>
-     * 
+     *
      * See JIRA issue ticket MATH-181 for more details:
-     * 
+     *
      * https://issues.apache.org/jira/browse/MATH-181
-     * 
+     *
      * @param value
      *            the double value to convert to a fraction.
      * @param epsilon
@@ -373,7 +373,7 @@
      * Continued Fraction</a> equations (11) and (22)-(26)</li>
      * </ul>
      * </p>
-     * 
+     *
      * @param value
      *            the double value to convert to a fraction.
      * @param maxDenominator
@@ -391,7 +391,7 @@
      * Create a {@link BigFraction} equivalent to the passed <tt>int</tt>, ie
      * "num / 1".
      * </p>
-     * 
+     *
      * @param num
      *            the numerator.
      */
@@ -404,7 +404,7 @@
      * Create a {@link BigFraction} given the numerator and denominator as simple
      * <tt>int</tt>. The {@link BigFraction} is reduced to lowest terms.
      * </p>
-     * 
+     *
      * @param num
      *            the numerator.
      * @param den
@@ -418,7 +418,7 @@
      * <p>
      * Create a {@link BigFraction} equivalent to the passed long, ie "num / 1".
      * </p>
-     * 
+     *
      * @param num
      *            the numerator.
      */
@@ -431,7 +431,7 @@
      * Create a {@link BigFraction} given the numerator and denominator as simple
      * <tt>long</tt>. The {@link BigFraction} is reduced to lowest terms.
      * </p>
-     * 
+     *
      * @param num
      *            the numerator.
      * @param den
@@ -445,7 +445,7 @@
      * <p>
      * Returns the absolute value of this {@link BigFraction}.
      * </p>
-     * 
+     *
      * @return the absolute value as a {@link BigFraction}.
      */
     public BigFraction abs() {
@@ -457,7 +457,7 @@
      * Adds the value of this fraction to the passed {@link BigInteger},
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param bg
      *            the {@link BigInteger} to add, must'nt be <code>null</code>.
      * @return a <code>BigFraction</code> instance with the resulting values.
@@ -473,7 +473,7 @@
      * Adds the value of this fraction to the passed <tt>integer</tt>, returning
      * the result in reduced form.
      * </p>
-     * 
+     *
      * @param i
      *            the <tt>integer</tt> to add.
      * @return a <code>BigFraction</code> instance with the resulting values.
@@ -487,7 +487,7 @@
      * Adds the value of this fraction to the passed <tt>long</tt>, returning
      * the result in reduced form.
      * </p>
-     * 
+     *
      * @param l
      *            the <tt>long</tt> to add.
      * @return a <code>BigFraction</code> instance with the resulting values.
@@ -501,7 +501,7 @@
      * Adds the value of this fraction to another, returning the result in
      * reduced form.
      * </p>
-     * 
+     *
      * @param fraction
      *            the {@link BigFraction} to add, must not be <code>null</code>.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -532,7 +532,7 @@
      * Gets the fraction as a <code>BigDecimal</code>. This calculates the
      * fraction as the numerator divided by denominator.
      * </p>
-     * 
+     *
      * @return the fraction as a <code>BigDecimal</code>.
      * @throws ArithmeticException
      *             if the exact quotient does not have a terminating decimal
@@ -549,7 +549,7 @@
      * rounding mode. This calculates the fraction as the numerator divided by
      * denominator.
      * </p>
-     * 
+     *
      * @param roundingMode
      *            rounding mode to apply. see {@link BigDecimal} constants.
      * @return the fraction as a <code>BigDecimal</code>.
@@ -568,7 +568,7 @@
      * and rounding mode. This calculates the fraction as the numerator divided
      * by denominator.
      * </p>
-     * 
+     *
      * @param scale
      *            scale of the <code>BigDecimal</code> quotient to be returned.
      *            see {@link BigDecimal} for more information.
@@ -585,7 +585,7 @@
      * <p>
      * Compares this object to another based on size.
      * </p>
-     * 
+     *
      * @param object
      *            the object to compare to, must not be <code>null</code>.
      * @return -1 if this is less than <tt>object</tt>, +1 if this is greater
@@ -603,7 +603,7 @@
      * Divide the value of this fraction by the passed <code>BigInteger</code>,
      * ie "this * 1 / bg", returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param bg
      *            the <code>BigInteger</code> to divide by, must not be
      *            <code>null</code>.
@@ -625,7 +625,7 @@
      * Divide the value of this fraction by the passed <tt>int</tt>, ie
      * "this * 1 / i", returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param i
      *            the <tt>int</tt> to divide by.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -641,7 +641,7 @@
      * Divide the value of this fraction by the passed <tt>long</tt>, ie
      * "this * 1 / l", returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param l
      *            the <tt>long</tt> to divide by.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -657,7 +657,7 @@
      * Divide the value of this fraction by another, returning the result in
      * reduced form.
      * </p>
-     * 
+     *
      * @param fraction
      *            the fraction to divide by, must not be <code>null</code>.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -679,7 +679,7 @@
      * Gets the fraction as a <tt>double</tt>. This calculates the fraction as
      * the numerator divided by denominator.
      * </p>
-     * 
+     *
      * @return the fraction as a <tt>double</tt>
      * @see java.lang.Number#doubleValue()
      */
@@ -694,7 +694,7 @@
      * denominators are the same for both fractions, the two fractions are
      * considered to be equal.
      * </p>
-     * 
+     *
      * @param other
      *            fraction to test for equality to this fraction, can be
      *            <code>null</code>.
@@ -723,7 +723,7 @@
      * Gets the fraction as a <tt>float</tt>. This calculates the fraction as
      * the numerator divided by denominator.
      * </p>
-     * 
+     *
      * @return the fraction as a <tt>float</tt>.
      * @see java.lang.Number#floatValue()
      */
@@ -736,7 +736,7 @@
      * <p>
      * Access the denominator as a <code>BigInteger</code>.
      * </p>
-     * 
+     *
      * @return the denominator as a <code>BigInteger</code>.
      */
     public BigInteger getDenominator() {
@@ -747,7 +747,7 @@
      * <p>
      * Access the denominator as a <tt>int</tt>.
      * </p>
-     * 
+     *
      * @return the denominator as a <tt>int</tt>.
      */
     public int getDenominatorAsInt() {
@@ -758,7 +758,7 @@
      * <p>
      * Access the denominator as a <tt>long</tt>.
      * </p>
-     * 
+     *
      * @return the denominator as a <tt>long</tt>.
      */
     public long getDenominatorAsLong() {
@@ -769,7 +769,7 @@
      * <p>
      * Access the numerator as a <code>BigInteger</code>.
      * </p>
-     * 
+     *
      * @return the numerator as a <code>BigInteger</code>.
      */
     public BigInteger getNumerator() {
@@ -780,7 +780,7 @@
      * <p>
      * Access the numerator as a <tt>int</tt>.
      * </p>
-     * 
+     *
      * @return the numerator as a <tt>int</tt>.
      */
     public int getNumeratorAsInt() {
@@ -791,7 +791,7 @@
      * <p>
      * Access the numerator as a <tt>long</tt>.
      * </p>
-     * 
+     *
      * @return the numerator as a <tt>long</tt>.
      */
     public long getNumeratorAsLong() {
@@ -802,7 +802,7 @@
      * <p>
      * Gets a hashCode for the fraction.
      * </p>
-     * 
+     *
      * @return a hash code value for this object.
      * @see java.lang.Object#hashCode()
      */
@@ -816,7 +816,7 @@
      * Gets the fraction as an <tt>int</tt>. This returns the whole number part
      * of the fraction.
      * </p>
-     * 
+     *
      * @return the whole number fraction part.
      * @see java.lang.Number#intValue()
      */
@@ -830,7 +830,7 @@
      * Gets the fraction as a <tt>long</tt>. This returns the whole number part
      * of the fraction.
      * </p>
-     * 
+     *
      * @return the whole number fraction part.
      * @see java.lang.Number#longValue()
      */
@@ -844,7 +844,7 @@
      * Multiplies the value of this fraction by the passed
      * <code>BigInteger</code>, returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param bg
      *            the <code>BigInteger</code> to multiply by.
      * @return a <code>BigFraction</code> instance with the resulting values.
@@ -860,7 +860,7 @@
      * Multiply the value of this fraction by the passed <tt>int</tt>, returning
      * the result in reduced form.
      * </p>
-     * 
+     *
      * @param i
      *            the <tt>int</tt> to multiply by.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -874,7 +874,7 @@
      * Multiply the value of this fraction by the passed <tt>long</tt>,
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param l
      *            the <tt>long</tt> to multiply by.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -888,7 +888,7 @@
      * Multiplies the value of this fraction by another, returning the result in
      * reduced form.
      * </p>
-     * 
+     *
      * @param fraction
      *            the fraction to multiply by, must not be <code>null</code>.
      * @return a {@link BigFraction} instance with the resulting values.
@@ -910,7 +910,7 @@
      * Return the additive inverse of this fraction, returning the result in
      * reduced form.
      * </p>
-     * 
+     *
      * @return the negation of this fraction.
      */
     public BigFraction negate() {
@@ -922,7 +922,7 @@
      * Gets the fraction percentage as a <tt>double</tt>. This calculates the
      * fraction as the numerator divided by denominator multiplied by 100.
      * </p>
-     * 
+     *
      * @return the fraction percentage as a <tt>double</tt>.
      */
     public double percentageValue() {
@@ -934,7 +934,7 @@
      * Returns a <tt>integer</tt> whose value is
      * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param exponent
      *            exponent to which this <code>BigInteger</code> is to be
      *            raised.
@@ -952,7 +952,7 @@
      * Returns a <code>BigFraction</code> whose value is
      * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
      * @return <tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.
@@ -965,13 +965,13 @@
         return new BigFraction(MathUtils.pow(numerator,   exponent),
                                MathUtils.pow(denominator, exponent));
     }
- 
+
     /**
      * <p>
      * Returns a <code>BigFraction</code> whose value is
      * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
      * @return <tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.
@@ -991,7 +991,7 @@
      * Returns a <code>double</code> whose value is
      * <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param exponent
      *            exponent to which this <code>BigFraction</code> is to be raised.
      * @return <tt>this<sup>exponent</sup></tt>.
@@ -1005,7 +1005,7 @@
      * <p>
      * Return the multiplicative inverse of this fraction.
      * </p>
-     * 
+     *
      * @return the reciprocal fraction.
      */
     public BigFraction reciprocal() {
@@ -1016,7 +1016,7 @@
      * <p>
      * Reduce this <code>BigFraction</code> to its lowest terms.
      * </p>
-     * 
+     *
      * @return the reduced <code>BigFraction</code>. It doesn't change anything if
      *         the fraction can be reduced.
      */
@@ -1030,7 +1030,7 @@
      * Subtracts the value of an {@link BigInteger} from the value of this one,
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param bg
      *            the {@link BigInteger} to subtract, must'nt be
      *            <code>null</code>.
@@ -1047,7 +1047,7 @@
      * Subtracts the value of an <tt>integer</tt> from the value of this one,
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param i
      *            the <tt>integer</tt> to subtract.
      * @return a <code>BigFraction</code> instance with the resulting values.
@@ -1061,7 +1061,7 @@
      * Subtracts the value of an <tt>integer</tt> from the value of this one,
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param l
      *            the <tt>long</tt> to subtract.
      * @return a <code>BigFraction</code> instance with the resulting values, or
@@ -1076,7 +1076,7 @@
      * Subtracts the value of another fraction from the value of this one,
      * returning the result in reduced form.
      * </p>
-     * 
+     *
      * @param fraction
      *            the {@link BigFraction} to subtract, must not be
      *            <code>null</code>.
@@ -1107,7 +1107,7 @@
      * Returns the <code>String</code> representing this fraction, ie
      * "num / dem" or just "num" if the denominator is one.
      * </p>
-     * 
+     *
      * @return a string representation of the fraction.
      * @see java.lang.Object#toString()
      */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java?rev=811685&r1=811684&r2=811685&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/fraction/BigFractionField.java Sat Sep  5 17:36:48 2009
@@ -70,7 +70,7 @@
      */
     private Object readResolve() {
         // return the singleton instance
-        return LazyHolder.INSTANCE; 
+        return LazyHolder.INSTANCE;
     }
 
 }



Mime
View raw message