Author: luc Date: Tue Sep 6 19:59:47 2011 New Revision: 1165808 URL: http://svn.apache.org/viewvc?rev=1165808&view=rev Log: removed MathUserException from transform package
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java?rev=1165808&r1=1165807&r2=1165808&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java Tue Sep 6 19:59:47 2011 @@ -16,7 +16,6 @@ */ package org.apache.commons.math.transform; -import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.complex.Complex; @@ -76,13 +75,11 @@ public class FastCosineTransformer imple * @param max the upper bound for the interval * @param n the number of sample points * @return the real transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] transform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); return fct(data); } @@ -117,13 +114,11 @@ public class FastCosineTransformer imple * @param max the upper bound for the interval * @param n the number of sample points * @return the real transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] transform2(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); double scaling_coefficient = FastMath.sqrt(2.0 / (n-1)); @@ -159,12 +154,11 @@ public class FastCosineTransformer imple * @param max the upper bound for the interval * @param n the number of sample points * @return the real inversely transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] inversetransform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); double scaling_coefficient = 2.0 / (n - 1); @@ -198,12 +192,11 @@ public class FastCosineTransformer imple * @param max the upper bound for the interval * @param n the number of sample points * @return the real inversely transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] inversetransform2(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { return transform2(f, min, max, n); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java?rev=1165808&r1=1165807&r2=1165808&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java Tue Sep 6 19:59:47 2011 @@ -19,7 +19,6 @@ package org.apache.commons.math.transfor import java.io.Serializable; import java.lang.reflect.Array; -import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.complex.Complex; @@ -86,13 +85,11 @@ public class FastFourierTransformer impl * @param max the upper bound for the interval * @param n the number of sample points * @return the complex transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public Complex[] transform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = sample(f, min, max, n); return fft(data, false); } @@ -141,13 +138,11 @@ public class FastFourierTransformer impl * @param max the upper bound for the interval * @param n the number of sample points * @return the complex transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public Complex[] transform2(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = sample(f, min, max, n); double scaling_coefficient = 1.0 / FastMath.sqrt(n); @@ -200,13 +195,11 @@ public class FastFourierTransformer impl * @param max the upper bound for the interval * @param n the number of sample points * @return the complex inversely transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public Complex[] inversetransform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = sample(f, min, max, n); double scaling_coefficient = 1.0 / n; @@ -259,13 +252,11 @@ public class FastFourierTransformer impl * @param max the upper bound for the interval * @param n the number of sample points * @return the complex inversely transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public Complex[] inversetransform2(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = sample(f, min, max, n); double scaling_coefficient = 1.0 / FastMath.sqrt(n); @@ -424,11 +415,10 @@ public class FastFourierTransformer impl * @param max the upper bound for the interval * @param n the number of sample points * @return the samples array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ public static double[] sample(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { if (n <= 0) { throw MathRuntimeException.createIllegalArgumentException( Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java?rev=1165808&r1=1165807&r2=1165808&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java Tue Sep 6 19:59:47 2011 @@ -16,7 +16,6 @@ */ package org.apache.commons.math.transform; -import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.exception.util.LocalizedFormats; @@ -43,7 +42,7 @@ public class FastHadamardTransformer imp /** {@inheritDoc} */ public double[] transform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { return fht(FastFourierTransformer.sample(f, min, max, n)); } @@ -56,7 +55,7 @@ public class FastHadamardTransformer imp /** {@inheritDoc} */ public double[] inversetransform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { final double[] unscaled = fht(FastFourierTransformer.sample(f, min, max, n)); return FastFourierTransformer.scaleArray(unscaled, 1.0 / n); Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java?rev=1165808&r1=1165807&r2=1165808&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java Tue Sep 6 19:59:47 2011 @@ -16,7 +16,6 @@ */ package org.apache.commons.math.transform; -import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.complex.Complex; @@ -75,13 +74,11 @@ public class FastSineTransformer impleme * @param max the upper bound for the interval * @param n the number of sample points * @return the real transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] transform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); data[0] = 0.0; @@ -115,13 +112,11 @@ public class FastSineTransformer impleme * @param max the upper bound for the interval * @param n the number of sample points * @return the real transformed array - * @throws MathUserException if function cannot be evaluated - * at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] transform2( UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); data[0] = 0.0; @@ -156,11 +151,10 @@ public class FastSineTransformer impleme * @param max the upper bound for the interval * @param n the number of sample points * @return the real inversely transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] inversetransform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { double data[] = FastFourierTransformer.sample(f, min, max, n); data[0] = 0.0; @@ -194,11 +188,10 @@ public class FastSineTransformer impleme * @param max the upper bound for the interval * @param n the number of sample points * @return the real inversely transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ public double[] inversetransform2(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException { + throws IllegalArgumentException { return transform2(f, min, max, n); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java?rev=1165808&r1=1165807&r2=1165808&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java Tue Sep 6 19:59:47 2011 @@ -16,7 +16,6 @@ */ package org.apache.commons.math.transform; -import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.analysis.UnivariateRealFunction; /** @@ -49,11 +48,10 @@ public interface RealTransformer { * @param max the upper bound for the interval * @param n the number of sample points * @return the real transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ double[] transform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException; + throws IllegalArgumentException; /** * Inversely transform the given real data set. @@ -71,10 +69,9 @@ public interface RealTransformer { * @param max the upper bound for the interval * @param n the number of sample points * @return the real inversely transformed array - * @throws MathUserException if function cannot be evaluated at some point * @throws IllegalArgumentException if any parameters are invalid */ double[] inversetransform(UnivariateRealFunction f, double min, double max, int n) - throws MathUserException, IllegalArgumentException; + throws IllegalArgumentException; }