Author: luc
Date: Mon Sep 10 14:48:03 2012
New Revision: 1382906

URL: http://svn.apache.org/viewvc?rev=1382906&view=rev
Log:
Updated throws declarations for transform package.

Modified:
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/FastCosineTransformer.java
    
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/RealTransformer.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/FastCosineTransformer.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/FastCosineTransformer.java?rev=1382906&r1=1382905&r2=1382906&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/FastCosineTransformer.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/FastCosineTransformer.java
 Mon Sep 10 14:48:03 2012
@@ -94,7 +94,8 @@ public class FastCosineTransformer imple
      * @throws MathIllegalArgumentException if the length of the data array is
      * not a power of two plus one
      */
-    public double[] transform(final double[] f, final TransformType type) {
+    public double[] transform(final double[] f, final TransformType type)
+      throws MathIllegalArgumentException {
         if (type == TransformType.FORWARD) {
             if (normalization == DctNormalization.ORTHOGONAL_DCT_I) {
                 final double s = FastMath.sqrt(2.0 / (f.length - 1));
@@ -124,7 +125,7 @@ public class FastCosineTransformer imple
      */
     public double[] transform(final UnivariateFunction f,
         final double min, final double max, final int n,
-        final TransformType type) {
+        final TransformType type) throws MathIllegalArgumentException {
 
         final double[] data = FunctionUtils.sample(f, min, max, n);
         return transform(data, type);

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/RealTransformer.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/RealTransformer.java?rev=1382906&r1=1382905&r2=1382906&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/RealTransformer.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/transform/RealTransformer.java
 Mon Sep 10 14:48:03 2012
@@ -17,6 +17,9 @@
 package org.apache.commons.math3.transform;
 
 import org.apache.commons.math3.analysis.UnivariateFunction;
+import org.apache.commons.math3.exception.MathIllegalArgumentException;
+import org.apache.commons.math3.exception.NonMonotonicSequenceException;
+import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 
 /**
  * <p>Interface for one-dimensional data sets transformations producing real
@@ -39,8 +42,11 @@ public interface RealTransformer  {
      * @param f the real data array to be transformed (signal)
      * @param type the type of transform (forward, inverse) to be performed
      * @return the real transformed array (spectrum)
+     * @throws MathIllegalArgumentException if the array cannot be transformed
+     * with the given type (this may be for example due to array size, which is
+     * constrained in some transforms)
      */
-    double[] transform(double[] f, TransformType type);
+    double[] transform(double[] f, TransformType type) throws 
MathIllegalArgumentException;
 
     /**
      * Returns the (forward, inverse) transform of the specified real function,
@@ -52,12 +58,15 @@ public interface RealTransformer  {
      * @param n the number of sample points
      * @param type the type of transform (forward, inverse) to be performed
      * @return the real transformed array
-     * @throws org.apache.commons.math3.exception.NonMonotonicSequenceException
-     * if the lower bound is greater than, or equal to the upper bound
-     * @throws org.apache.commons.math3.exception.NotStrictlyPositiveException
-     * if the number of sample points is negative
+     * @throws NonMonotonicSequenceException if the lower bound is greater 
than,
+     * or equal to the upper bound
+     * @throws NotStrictlyPositiveException if the number of sample points is 
negative
+     * @throws MathIllegalArgumentException if the sample cannot be transformed
+     * with the given type (this may be for example due to sample size, which 
is
+     * constrained in some transforms)
      */
-    double[] transform(UnivariateFunction f,
-            double min, double max, int n,
-            TransformType type);
+    double[] transform(UnivariateFunction f, double min, double max, int n,
+                       TransformType type)
+        throws NonMonotonicSequenceException, NotStrictlyPositiveException, 
MathIllegalArgumentException;
+
 }


Reply via email to