Author: celestin
Date: Wed Jan 18 06:17:05 2012
New Revision: 1232755

URL: http://svn.apache.org/viewvc?rev=1232755&view=rev
Log:
In LogNormalDistribution and LogNormalDistributionTest
  - "mean" (of the underlying normal distribution) is now called "scale"
  - "standard deviation" (of the underlying normal distribution) is now called 
"shape"
  - in the javadoc, removed html links that point to internal anchors.

Modified:
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/LogNormalDistribution.java
    
commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/LogNormalDistributionTest.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/LogNormalDistribution.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/LogNormalDistribution.java?rev=1232755&r1=1232754&r2=1232755&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/LogNormalDistribution.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/LogNormalDistribution.java
 Wed Jan 18 06:17:05 2012
@@ -27,7 +27,7 @@ import org.apache.commons.math.util.Fast
  * Implementation of the log-normal (gaussian) distribution.
  *
  * <p>
- * <a id="parameters"><strong>Parameters:</strong></a>
+ * <strong>Parameters:</strong>
  * {@code X} is log-normally distributed if its natural logarithm {@code 
log(X)}
  * is normally distributed. The probability distribution function of {@code X}
  * is given by (for {@code x > 0})
@@ -64,19 +64,17 @@ public class LogNormalDistribution exten
     /** &radic;(2) */
     private static final double SQRT2 = FastMath.sqrt(2.0);
 
-    /** The <a href="#parameters">scale</a> parameter of this distribution. */
+    /** The scale parameter of this distribution. */
     private final double scale;
 
-    /** The <a href="#parameters">shape</a> parameter of this distribution. */
+    /** The shape parameter of this distribution. */
     private final double shape;
 
     /** Inverse cumulative probability accuracy. */
     private final double solverAbsoluteAccuracy;
 
     /**
-     * Create a log-normal distribution using the specified
-     * <a href="#parameters">scale</a> and
-     * <a href="#parameters">shape</a>.
+     * Create a log-normal distribution using the specified scale and shape.
      *
      * @param scale the scale parameter of this distribution
      * @param shape the shape parameter of this distribution
@@ -88,8 +86,7 @@ public class LogNormalDistribution exten
     }
 
     /**
-     * Create a log-normal distribution using the specified
-     * <a href="#parameters">scale</a>, <a href="#parameters">shape</a> and
+     * Create a log-normal distribution using the specified scale, shape and
      * inverse cumulative distribution accuracy.
      *
      * @param scale the scale parameter of this distribution
@@ -100,7 +97,7 @@ public class LogNormalDistribution exten
     public LogNormalDistribution(double scale, double shape,
         double inverseCumAccuracy) throws NotStrictlyPositiveException {
         if (shape <= 0) {
-            throw new 
NotStrictlyPositiveException(LocalizedFormats.STANDARD_DEVIATION, shape);
+            throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE, 
shape);
         }
 
         this.scale = scale;
@@ -120,7 +117,7 @@ public class LogNormalDistribution exten
     }
 
     /**
-     * Returns the <a href="#parameters">scale</a> parameter of this 
distribution.
+     * Returns the scale parameter of this distribution.
      *
      * @return the scale parameter
      */
@@ -129,8 +126,7 @@ public class LogNormalDistribution exten
     }
 
     /**
-     * Returns the <a href="#parameters">shape</a> parameter of this
-     * distribution.
+     * Returns the shape parameter of this distribution.
      *
      * @return the shape parameter
      */

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/LogNormalDistributionTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/LogNormalDistributionTest.java?rev=1232755&r1=1232754&r2=1232755&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/LogNormalDistributionTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/LogNormalDistributionTest.java
 Wed Jan 18 06:17:05 2012
@@ -164,13 +164,13 @@ public class LogNormalDistributionTest e
     }
 
     @Test
-    public void testGetMean() {
+    public void testGetScale() {
         LogNormalDistribution distribution = 
(LogNormalDistribution)getDistribution();
         Assert.assertEquals(2.1, distribution.getScale(), 0);
     }
 
     @Test
-    public void testGetStandardDeviation() {
+    public void testGetShape() {
         LogNormalDistribution distribution = 
(LogNormalDistribution)getDistribution();
         Assert.assertEquals(1.4, distribution.getShape(), 0);
     }
@@ -193,8 +193,9 @@ public class LogNormalDistributionTest e
                                                0.1836267118});
     }
 
-    private void checkDensity(double mean, double sd, double[] x, double[] 
expected) {
-        LogNormalDistribution d = new LogNormalDistribution(mean, sd);
+    private void checkDensity(double scale, double shape, double[] x,
+        double[] expected) {
+        LogNormalDistribution d = new LogNormalDistribution(scale, shape);
         for (int i = 0; i < x.length; i++) {
             Assert.assertEquals(expected[i], d.density(x[i]), 1e-9);
         }


Reply via email to