Author: brentworden
Date: Sat Mar  8 19:54:20 2008
New Revision: 635154

URL: http://svn.apache.org/viewvc?rev=635154&view=rev
Log:
MATH-193.  javadoc and style fixes.

Modified:
    
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
    commons/proper/math/trunk/src/site/xdoc/changes.xml
    
commons/proper/math/trunk/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
 Sat Mar  8 19:54:20 2008
@@ -104,7 +104,7 @@
     }
     
     /**
-     * Create a new BigMatrix using the <code>data</code> as the underlying
+     * Create a new BigMatrix using <code>d</code> as the underlying
      * data array.
      * <p>
      * The input array is copied, not referenced.</p>
@@ -120,7 +120,7 @@
     }
     
     /**
-     * Create a new BigMatrix using the <code>data</code> as the underlying
+     * Create a new BigMatrix using <code>d</code> as the underlying
      * data array.
      * <p>
      * The input array is copied, not referenced.</p>
@@ -153,7 +153,7 @@
     
     /**
      * Create a new BigMatrix using the values represented by the strings in 
-     * <code>data</code> as the underlying data array.
+     * <code>d</code> as the underlying data array.
      *
      * @param d data for new matrix
      * @throws IllegalArgumentException if <code>d</code> is not rectangular

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
 Sat Mar  8 19:54:20 2008
@@ -101,9 +101,9 @@
      * The input array is copied, not referenced.</p>
      *
      * @param d data for new matrix
-     * @throws IllegalArgumentException if <code>data</code> is not rectangular
+     * @throws IllegalArgumentException if <code>d</code> is not rectangular
      *  (not all rows have the same length) or empty
-     * @throws NullPointerException if <code>data</code> is null
+     * @throws NullPointerException if <code>d</code> is null
      */
     public RealMatrixImpl(double[][] d) {
         this.copyIn(d);
@@ -164,7 +164,7 @@
      *
      * @param m    matrix to be subtracted
      * @return     this + m
-     * @throws  IllegalArgumentException if m is not the same size as *this
+     * @throws  IllegalArgumentException if m is not the same size as this
      */
     public RealMatrix subtract(RealMatrix m) throws IllegalArgumentException {
         if (this.getColumnDimension() != m.getColumnDimension() ||

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
 Sat Mar  8 19:54:20 2008
@@ -19,6 +19,7 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 import java.io.Serializable;
 
 /**
@@ -368,7 +369,7 @@
   private int index;
 
   /** Steps table. */
-  private ArrayList steps;
+  private List steps;
 
   /** Serializable version identifier */
   private static final long serialVersionUID = 2259286184268533249L;

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/ode/SwitchingFunctionsHandler.java
 Sat Mar  8 19:54:20 2008
@@ -22,6 +22,7 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 /** This class handles several [EMAIL PROTECTED] SwitchingFunction switching
  * functions} during integration.
@@ -194,7 +195,7 @@
   }
 
   /** Switching functions. */
-  private ArrayList functions;
+  private List functions;
 
   /** First active switching function. */
   private SwitchState first;

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
 Sat Mar  8 19:54:20 2008
@@ -64,7 +64,7 @@
     private static final long serialVersionUID = -6773236347582113490L;
 
     /** List of SummaryStatistics objects characterizing the bins */
-    private ArrayList binStats = null;
+    private List binStats = null;
 
     /** Sample statistics */
     private SummaryStatistics sampleStats = null;
@@ -447,8 +447,8 @@
     }
 
     /**
-     * Returns an ArrayList of [EMAIL PROTECTED] SummaryStatistics} instances 
containing
-     * statistics describing the values in each of the bins.  The ArrayList is
+     * Returns a List of [EMAIL PROTECTED] SummaryStatistics} instances 
containing
+     * statistics describing the values in each of the bins.  The list is
      * indexed on the bin number.
      * 
      * @return List of bin statistics.

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
 Sat Mar  8 19:54:20 2008
@@ -368,7 +368,7 @@
      * <a 
href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc252.htm";>here.</a>
      * </p><p>
      * <strong>Preconditions</strong>:<ul>
-     * <li><code>0 &lt; p &lt; 100</code> (otherwise an 
+     * <li><code>0 &lt; p &le; 100</code> (otherwise an 
      * <code>IllegalArgumentException</code> is thrown)</li>
      * <li>at least one value must be stored (returns <code>Double.NaN
      *     </code> otherwise)</li>

Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Sat Mar  8 19:54:20 2008
@@ -39,7 +39,13 @@
 Commons Math Release Notes</title>
   </properties>
   <body>
-    <release version="1.2-RC2" date="TBD"
+    <release version="1.3-SNAPSHOT" date="TBD"
+    description="TBD">
+      <action dev="brentworden" type="fix" issue="MATH-193" due-to="Michael 
Heuer and Sebb">
+        Javadoc and style fixes.
+      </action>
+    </release>
+    <release version="1.2" date="2008-02-24"
     description="This release combines bug fixes and new features. Most notable
     among the new features are the estimation, optimization, geometry and ode
     packages added from the Mantissa library. Implementations of fast Fourier

Modified: 
commons/proper/math/trunk/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java?rev=635154&r1=635153&r2=635154&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java
 Sat Mar  8 19:54:20 2008
@@ -185,7 +185,40 @@
         dist2 = (EmpiricalDistribution) 
TestUtils.serializeAndRecover(empiricalDistribution2);
         verifySame(empiricalDistribution2, dist2);
     }
-    
+
+    public void testLoadNullDoubleArray() {
+        EmpiricalDistribution dist = new EmpiricalDistributionImpl();
+        try {
+            dist.load((double[]) null);
+            fail("load((double[]) null) expected RuntimeException");
+        }
+        catch (RuntimeException e) {
+            // expected
+        }
+    }
+
+    public void testLoadNullURL() throws Exception {
+        EmpiricalDistribution dist = new EmpiricalDistributionImpl();
+        try {
+            dist.load((URL) null);
+            fail("load((URL) null) expected NullPointerException");
+        }
+        catch (NullPointerException e) {
+            // expected
+        }
+    }
+
+    public void testLoadNullFile() throws Exception {
+        EmpiricalDistribution dist = new EmpiricalDistributionImpl();
+        try {
+            dist.load((File) null);
+            fail("load((File) null) expected NullPointerException");
+        }
+        catch (NullPointerException e) {
+            // expected
+        }
+    }
+
     private void verifySame(EmpiricalDistribution d1, EmpiricalDistribution 
d2) {
         assertEquals(d1.isLoaded(), d2.isLoaded());
         assertEquals(d1.getBinCount(), d2.getBinCount());


Reply via email to