commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1032424 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: analysis/UnivariateRealFunction.java util/MathUtils.java
Date Sun, 07 Nov 2010 23:49:42 GMT
Author: erans
Date: Sun Nov  7 23:49:42 2010
New Revision: 1032424

URL: http://svn.apache.org/viewvc?rev=1032424&view=rev
Log:
MATH-195
Added requested Javadoc comment.
Removed unused import.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java?rev=1032424&r1=1032423&r2=1032424&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
Sun Nov  7 23:49:42 2010
@@ -27,6 +27,22 @@ public interface UnivariateRealFunction 
      *
      * @param x Point at which the function value should be computed.
      * @return the value.
+     * @throws IllegalArgumentException when the activated method itself can
+     * ascertain that preconditions specified in the API expressed at the
+     * level of the activated method have been violated.  In the vast
+     * majority of cases where Commons-Math throws IllegalArgumentException,
+     * it is the result of argument checking of actual parameters immediately
+     * passed to a method.
+     * @throws org.apache.commons.math.exception.FunctionEvaluationException
+     * when the method that may encounter errors during evaluation.
+     * This should be thrown only in circumstances where, at the level of the
+     * activated function, IllegalArgumentException is not appropriate and it
+     * should indicate that while formal preconditions of the method have not
+     * been violated, an irrecoverable error has occurred evaluating a
+     * function at some (usually lower) level of the call stack.
+     * Convergence failures, runtime exceptions (even IllegalArgumentException)
+     * in user code or lower level methods can cause (and should be wrapped in)
+     * a FunctionEvaluationException.
      */
     double value(double x);
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1032424&r1=1032423&r2=1032424&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Sun
Nov  7 23:49:42 2010
@@ -23,7 +23,6 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Comparator;
-import java.util.Map;
 import java.util.Collections;
 
 import org.apache.commons.math.MathRuntimeException;



Mime
View raw message