psteitz     2004/02/19 22:22:39

  Modified:    math/src/java/org/apache/commons/math/analysis
                        BisectionSolver.java BrentSolver.java
                        CubicSplineFunction.java
                        UnivariateRealFunction.java
                        UnivariateRealInterpolator.java
                        UnivariateRealSolver.java
  Log:
  javadoc, error message cleanup.
  
  Revision  Changes    Path
  1.12      +7 -7      
jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java
  
  Index: BisectionSolver.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BisectionSolver.java      18 Feb 2004 03:24:19 -0000      1.11
  +++ BisectionSolver.java      20 Feb 2004 06:22:39 -0000      1.12
  @@ -22,9 +22,9 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Provide the bisection algorithm for solving for zeros of real univariate
  - * functions.  It will only search for one zero in the given interval.  The
  - * function is supposed to be continuous but not necessarily smooth.
  + * Implements the <a href="http://mathworld.wolfram.com/Bisection.html";>bisection 
algorithm</a>
  + *  for finding zeros of univariate real functions.  This algorithm will find only 
one zero in the given interval.
  + * The function should be continuous but not necessarily smooth.
    * @version $Revision$ $Date$
    */
   public class BisectionSolver extends UnivariateRealSolverImpl implements 
Serializable {
  @@ -37,7 +37,7 @@
       }
   
       /**
  -     * Solve for a zero in the given interval.
  +     * Find a zero in the given interval.
        * @param min the lower bound for the interval.
        * @param max the upper bound for the interval.
        * @param initial the start value to use (ignored).
  @@ -52,7 +52,7 @@
       }
       
       /**
  -     * Solve for a zero root in the given interval.
  +     * Find a zero root in the given interval.
        * @param min the lower bound for the interval.
        * @param max the upper bound for the interval.
        * @return the value where the function is zero
  @@ -89,7 +89,7 @@
               ++i;
           }
           
  -        throw new MathException("Maximal iteration number exceeded");
  +        throw new MathException("Maximum number of iterations exceeded");
       }
   
       /**
  
  
  
  1.13      +8 -8      
jakarta-commons/math/src/java/org/apache/commons/math/analysis/BrentSolver.java
  
  Index: BrentSolver.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/BrentSolver.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BrentSolver.java  18 Feb 2004 03:24:19 -0000      1.12
  +++ BrentSolver.java  20 Feb 2004 06:22:39 -0000      1.13
  @@ -22,10 +22,10 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Provide the Brent algorithm for solving for zeros of real univariate
  - * functions.
  - * It will only search for one zero in the given interval.
  - * The function is supposed to be continuous but not necessarily smooth.
  + * Implements the <a href="http://mathworld.wolfram.com/BrentsMethod.html";>Brent 
algorithm</a>
  + * for  finding zeros of real univariate
  + * functions. This algorithm will find only one zero in the given interval. 
  + * The function should be continuous but not necessarily smooth.
    *  
    * @version $Revision$ $Date$
    */
  @@ -39,7 +39,7 @@
       }
   
       /**
  -     * Solve for a zero in the given interval.
  +     * Find a zero in the given interval.
        * @param min the lower bound for the interval.
        * @param max the upper bound for the interval.
        * @param initial the start value to use (ignored).
  @@ -54,7 +54,7 @@
       }
       
       /**
  -     * Solve for a zero root in the given interval.
  +     * Find a zero in the given interval.
        * @param min the lower bound for the interval.
        * @param max the upper bound for the interval.
        * @return the value where the function is zero
  @@ -159,6 +159,6 @@
               }
               i++;
           }
  -        throw new MathException("Maximal iteration number exceeded.");
  +        throw new MathException("Maximum number of iterations exceeded.");
       }
   }
  
  
  
  1.13      +5 -10     
jakarta-commons/math/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java
  
  Index: CubicSplineFunction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CubicSplineFunction.java  18 Feb 2004 03:24:19 -0000      1.12
  +++ CubicSplineFunction.java  20 Feb 2004 06:22:39 -0000      1.13
  @@ -23,11 +23,9 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Represents a cubic spline function.
  - * Spline functions map a certain interval of real numbers to real numbers.
  - * A cubic spline consists of segments of cubic functions. For this class,
  - * polynominal coefficents are used.
  - * Arguments outside of the domain cause an IllegalArgumentException.
  + * Represents a <a href="http://mathworld.wolfram.com/CubicSpline.html";>cubic 
spline function</a>.
  + * Arguments outside of the domain determined by the x values array passed to the 
constructor
  + * cause an IllegalArgumentException.
    * 
    * @version $Revision$ $Date$
    */
  @@ -54,6 +52,7 @@
       public CubicSplineFunction(double xval[], double c[][]) {
           super();
           // TODO: should copy the arguments here, for safety. This could be a major 
overhead.
  +        // Should also verify that xval[] is in correct order, and arrays have 
correct lengths
           this.xval = xval;
           this.c = c;
       }
  @@ -80,10 +79,6 @@
   
       /**
        * Compute the value for the first derivative of the function.
  -     * It is recommended to provide this method only if the first derivative is
  -     * analytical. Numerical derivatives may be acceptable in some cases.
  -     * An implementation should throw an UnsupportedOperationException if
  -     * this method is not implemented.
        * @param x the point for which the first derivative should be computed
        * @return the value
        * @throws MathException if the derivative couldn't be computed.
  
  
  
  1.11      +2 -6      
jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java
  
  Index: UnivariateRealFunction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealFunction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UnivariateRealFunction.java       29 Jan 2004 00:49:00 -0000      1.10
  +++ UnivariateRealFunction.java       20 Feb 2004 06:22:39 -0000      1.11
  @@ -56,11 +56,7 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Provide an interface univariate real functions.
  - * The object may held temporary data which is shared between calculations
  - * of the value and the derivatives for the same argument. It is not guaranteed
  - * that derivatives are evaluated after the value, the evaluation algorithm
  - * should throw an InvalidStateException if it can't cope with this.
  + * An interface representing a univariate real function.
    *  
    * @version $Revision$ $Date$
    */
  
  
  
  1.9       +2 -2      
jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java
  
  Index: UnivariateRealInterpolator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealInterpolator.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- UnivariateRealInterpolator.java   29 Jan 2004 00:49:00 -0000      1.8
  +++ UnivariateRealInterpolator.java   20 Feb 2004 06:22:39 -0000      1.9
  @@ -56,7 +56,7 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Interface for interpolating a data set.
  + * Interface representing a univariate real interpolating function.
    *  
    * @version $Revision$ $Date$
    */
  
  
  
  1.10      +7 -7      
jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java
  
  Index: UnivariateRealSolver.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolver.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UnivariateRealSolver.java 29 Jan 2004 00:49:00 -0000      1.9
  +++ UnivariateRealSolver.java 20 Feb 2004 06:22:39 -0000      1.10
  @@ -56,9 +56,9 @@
   import org.apache.commons.math.MathException;
   
   /**
  - * Provide an interface to algorithms for solving for zeros of real univariate
  - * functions.
  - * An implementation will only search for one zero in the given interval.
  + * Interface for (univariate real) rootfinding algorithms.
  + * <p>
  + * Implementations will search for only one zero in the given interval.
    *  
    * @version $Revision$ $Date$
    */
  @@ -68,7 +68,7 @@
        * Set the upper limit for the number of iterations.
        * 
        * Usually a high iteration count indicates convergence problems. However,
  -     * the "reasonable value" varies widely for different solvers, users are
  +     * the "reasonable value" varies widely for different solvers.  Users are
        * advised to use the default value supplied by the solver.
        *  
        * An exception will be thrown if the number is exceeded.
  @@ -96,8 +96,8 @@
       /**
        * Set the absolute accuracy.
        * 
  -     * The default is usually choosen so taht roots in the interval
  -     * -10..-0.1 and +0.1..+10 can be found wit a reasonable accuracy. If the
  +     * The default is usually choosen so that roots in the interval
  +     * -10..-0.1 and +0.1..+10 can be found with a reasonable accuracy. If the
        * expected absolute value of your roots is of much smaller magnitude, set
        * this to a smaller value.
        * 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to