commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1180232 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/util/FastMathResources.java test/java/org/apache/commons/math/util/FastMathLoadCheck.java
Date Fri, 07 Oct 2011 20:54:07 GMT
Author: erans
Date: Fri Oct  7 20:54:06 2011
New Revision: 1180232

URL: http://svn.apache.org/viewvc?rev=1180232&view=rev
Log:
Layout and doc minor fixes.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMathResources.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathLoadCheck.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMathResources.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMathResources.java?rev=1180232&r1=1180231&r2=1180232&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMathResources.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMathResources.java
Fri Oct  7 20:54:06 2011
@@ -19,13 +19,14 @@ package org.apache.commons.math.util;
 
 import java.io.File;
 import java.io.DataOutputStream;
+import java.io.InputStream;
 import java.io.DataInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedInputStream;
 import java.io.FileOutputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import  org.apache.commons.math.exception.MathInternalError;
+import org.apache.commons.math.exception.MathInternalError;
 
 /**
  * Utility class for saving and loading tabulated data used by
@@ -130,6 +131,7 @@ public class FastMathResources {
     public static double[][] loadExpInt() {
         return loadTable2d(EXP_INT, 2, FastMath.EXP_INT_TABLE_LEN);
     }
+
     /**
      * Load "EXP_FRAC" tables.
      * "EXP_FRAC_TABLE_A" is at index 0.
@@ -137,16 +139,15 @@ public class FastMathResources {
      *
      * @return the retrieved data.
      */
-
     public static double[][] loadExpFrac() {
         return loadTable2d(EXP_FRAC, 2, FastMath.EXP_FRAC_TABLE_LEN);
     }
+
     /**
      * Load "LN_MANT".
      *
      * @return the retrieved data.
      */
-
     public static double[][] loadLnMant() {
         return loadTable2d(LN_MANT, FastMath.LN_MANT_LEN, 2);
     }
@@ -216,10 +217,10 @@ public class FastMathResources {
     private static DataInputStream in(String name)
         throws FileNotFoundException {
         final String fullName = "/" + RES_PREFIX + name;
-        return new DataInputStream(new BufferedInputStream(FastMathResources.class.getResourceAsStream(fullName)));
+        final InputStream in = FastMathResources.class.getResourceAsStream(fullName);
+        return new DataInputStream(new BufferedInputStream(in));
     }
 
-
     /**
      * @param name Basename of the resource.
      * @param len Number of {@code double}s to be retrieved.

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathLoadCheck.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathLoadCheck.java?rev=1180232&r1=1180231&r2=1180232&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathLoadCheck.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathLoadCheck.java
Fri Oct  7 20:54:06 2011
@@ -5,7 +5,7 @@ import java.lang.reflect.Field;
 /*
  * FastMath load performance test - requires that
  * <ul>
- *  <li>{@code FastMath.USE_PRECOMPUTED_TABLES}</li>
+ *  <li>{@code FastMath.RECOMPUTE_TABLES_AT_RUNTIME}</li>
  *  <li>{@code FastMath.LOAD_RESOURCES}</li>
  * </ul>
  * be non-"final".



Mime
View raw message