You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ce...@apache.org on 2011/11/30 07:34:01 UTC
svn commit: r1208293 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math/transform/
test/java/org/apache/commons/math/transform/
Author: celestin
Date: Wed Nov 30 06:33:57 2011
New Revision: 1208293
URL: http://svn.apache.org/viewvc?rev=1208293&view=rev
Log:
Corrected to camelCase some method names (MATH-677).
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
commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastHadamardTransformerTest.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.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=1208293&r1=1208292&r2=1208293&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 Wed Nov 30 06:33:57 2011
@@ -41,9 +41,7 @@ import org.apache.commons.math.util.Fast
*/
public class FastCosineTransformer implements RealTransformer {
- /**
- * Construct a default transformer.
- */
+ /** Construct a default transformer. */
public FastCosineTransformer() {
super();
}
@@ -136,7 +134,7 @@ public class FastCosineTransformer imple
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform(double f[]) throws IllegalArgumentException {
+ public double[] inverseTransform(double f[]) throws IllegalArgumentException {
double scaling_coefficient = 2.0 / (f.length - 1);
return FastFourierTransformer.scaleArray(fct(f), scaling_coefficient);
@@ -156,7 +154,7 @@ public class FastCosineTransformer imple
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform(UnivariateFunction f,
+ public double[] inverseTransform(UnivariateFunction f,
double min, double max, int n)
throws IllegalArgumentException {
@@ -176,7 +174,7 @@ public class FastCosineTransformer imple
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform2(double f[]) throws IllegalArgumentException {
+ public double[] inverseTransform2(double f[]) throws IllegalArgumentException {
return transform2(f);
}
@@ -194,7 +192,7 @@ public class FastCosineTransformer imple
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform2(UnivariateFunction f,
+ public double[] inverseTransform2(UnivariateFunction f,
double min, double max, int n)
throws IllegalArgumentException {
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=1208293&r1=1208292&r2=1208293&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 Wed Nov 30 06:33:57 2011
@@ -177,7 +177,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform(double f[])
+ public Complex[] inverseTransform(double f[])
throws IllegalArgumentException {
double scaling_coefficient = 1.0 / f.length;
@@ -197,7 +197,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform(UnivariateFunction f,
+ public Complex[] inverseTransform(UnivariateFunction f,
double min, double max, int n)
throws IllegalArgumentException {
@@ -216,7 +216,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform(Complex f[])
+ public Complex[] inverseTransform(Complex f[])
throws IllegalArgumentException {
roots.computeOmega(-f.length); // pass negative argument
@@ -234,7 +234,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform2(double f[])
+ public Complex[] inverseTransform2(double f[])
throws IllegalArgumentException {
double scaling_coefficient = 1.0 / FastMath.sqrt(f.length);
@@ -254,7 +254,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform2(UnivariateFunction f,
+ public Complex[] inverseTransform2(UnivariateFunction f,
double min, double max, int n)
throws IllegalArgumentException {
@@ -273,7 +273,7 @@ public class FastFourierTransformer impl
* @return the complex inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public Complex[] inversetransform2(Complex f[])
+ public Complex[] inverseTransform2(Complex f[])
throws IllegalArgumentException {
roots.computeOmega(-f.length); // pass negative argument
@@ -520,7 +520,7 @@ public class FastFourierTransformer impl
/**
* Performs a multi-dimensional Fourier transform on a given array.
- * Use {@link #inversetransform2(Complex[])} and
+ * Use {@link #inverseTransform2(Complex[])} and
* {@link #transform2(Complex[])} in a row-column implementation
* in any number of dimensions with O(N×log(N)) complexity with
* N=n<sub>1</sub>×n<sub>2</sub>×n<sub>3</sub>×...×n<sub>d</sub>,
@@ -569,7 +569,7 @@ public class FastFourierTransformer impl
if (forward) {
temp = transform2(temp);
} else {
- temp = inversetransform2(temp);
+ temp = inverseTransform2(temp);
}
for (int i = 0; i < dimensionSize[d]; i++) {
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=1208293&r1=1208292&r2=1208293&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 Wed Nov 30 06:33:57 2011
@@ -47,13 +47,13 @@ public class FastHadamardTransformer imp
}
/** {@inheritDoc} */
- public double[] inversetransform(double f[])
+ public double[] inverseTransform(double f[])
throws IllegalArgumentException {
return FastFourierTransformer.scaleArray(fht(f), 1.0 / f.length);
}
/** {@inheritDoc} */
- public double[] inversetransform(UnivariateFunction f,
+ public double[] inverseTransform(UnivariateFunction f,
double min, double max, int n)
throws IllegalArgumentException {
final double[] unscaled =
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=1208293&r1=1208292&r2=1208293&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 Wed Nov 30 06:33:57 2011
@@ -41,9 +41,7 @@ import org.apache.commons.math.util.Fast
*/
public class FastSineTransformer implements RealTransformer {
- /**
- * Construct a default transformer.
- */
+ /** Construct a default transformer. */
public FastSineTransformer() {
super();
}
@@ -134,7 +132,7 @@ public class FastSineTransformer impleme
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform(double f[]) throws IllegalArgumentException {
+ public double[] inverseTransform(double f[]) throws IllegalArgumentException {
double scaling_coefficient = 2.0 / f.length;
return FastFourierTransformer.scaleArray(fst(f), scaling_coefficient);
@@ -153,7 +151,7 @@ public class FastSineTransformer impleme
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform(UnivariateFunction f, double min, double max, int n)
+ public double[] inverseTransform(UnivariateFunction f, double min, double max, int n)
throws IllegalArgumentException {
double data[] = FastFourierTransformer.sample(f, min, max, n);
@@ -172,7 +170,7 @@ public class FastSineTransformer impleme
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform2(double f[]) throws IllegalArgumentException {
+ public double[] inverseTransform2(double f[]) throws IllegalArgumentException {
return transform2(f);
}
@@ -190,7 +188,7 @@ public class FastSineTransformer impleme
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- public double[] inversetransform2(UnivariateFunction f, double min, double max, int n)
+ public double[] inverseTransform2(UnivariateFunction f, double min, double max, int n)
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=1208293&r1=1208292&r2=1208293&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 Wed Nov 30 06:33:57 2011
@@ -59,7 +59,7 @@ public interface RealTransformer {
* @return the real inversely transformed array (signal)
* @throws IllegalArgumentException if any parameters are invalid
*/
- double[] inversetransform(double f[])
+ double[] inverseTransform(double f[])
throws IllegalArgumentException;
/**
@@ -71,7 +71,7 @@ public interface RealTransformer {
* @return the real inversely transformed array
* @throws IllegalArgumentException if any parameters are invalid
*/
- double[] inversetransform(UnivariateFunction f, double min, double max, int n)
+ double[] inverseTransform(UnivariateFunction f, double min, double max, int n)
throws IllegalArgumentException;
}
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java?rev=1208293&r1=1208292&r2=1208293&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastCosineTransformerTest.java Wed Nov 30 06:33:57 2011
@@ -49,7 +49,7 @@ public final class FastCosineTransformer
Assert.assertEquals(y[i], result[i], tolerance);
}
- result = transformer.inversetransform(y);
+ result = transformer.inverseTransform(y);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(x[i], result[i], tolerance);
}
@@ -61,7 +61,7 @@ public final class FastCosineTransformer
Assert.assertEquals(x[i], result[i], tolerance);
}
- result = transformer.inversetransform2(x);
+ result = transformer.inverseTransform2(x);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(y[i], result[i], tolerance);
}
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java?rev=1208293&r1=1208292&r2=1208293&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastFourierTransformerTest.java Wed Nov 30 06:33:57 2011
@@ -57,7 +57,7 @@ public final class FastFourierTransforme
Assert.assertEquals(y[i].getImaginary(), result[i].getImaginary(), tolerance);
}
- result = transformer.inversetransform(y);
+ result = transformer.inverseTransform(y);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(x[i], result[i].getReal(), tolerance);
Assert.assertEquals(0.0, result[i].getImaginary(), tolerance);
@@ -73,7 +73,7 @@ public final class FastFourierTransforme
Assert.assertEquals(0.0, result[i].getImaginary(), tolerance);
}
- result = transformer.inversetransform2(x2);
+ result = transformer.inverseTransform2(x2);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(y2[i].getReal(), result[i].getReal(), tolerance);
Assert.assertEquals(y2[i].getImaginary(), result[i].getImaginary(), tolerance);
@@ -135,7 +135,7 @@ public final class FastFourierTransforme
}
min = -FastMath.PI; max = FastMath.PI;
- result = transformer.inversetransform(f, min, max, N);
+ result = transformer.inverseTransform(f, min, max, N);
Assert.assertEquals(0.0, result[1].getReal(), tolerance);
Assert.assertEquals(-0.5, result[1].getImaginary(), tolerance);
Assert.assertEquals(0.0, result[N-1].getReal(), tolerance);
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastHadamardTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastHadamardTransformerTest.java?rev=1208293&r1=1208292&r2=1208293&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastHadamardTransformerTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastHadamardTransformerTest.java Wed Nov 30 06:33:57 2011
@@ -51,7 +51,7 @@ public final class FastHadamardTransform
@Test
public void testNoIntInverse() {
FastHadamardTransformer transformer = new FastHadamardTransformer();
- double[] x = transformer.inversetransform(new double[] { 0, 1, 0, 1});
+ double[] x = transformer.inverseTransform(new double[] { 0, 1, 0, 1});
Assert.assertEquals( 0.5, x[0], 0);
Assert.assertEquals(-0.5, x[1], 0);
Assert.assertEquals( 0.0, x[2], 0);
@@ -115,7 +115,7 @@ public final class FastHadamardTransform
for (int i = 0; i < dY.length; ++i) {
dY[i] = y[i];
}
- double dResult[] = transformer.inversetransform(dY);
+ double dResult[] = transformer.inverseTransform(dY);
for (int i = 0; i < dResult.length; i++) {
// compare computed results to precomputed results
Assert.assertTrue(Precision.equals(x[i], dResult[i], 1));
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java?rev=1208293&r1=1208292&r2=1208293&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/transform/FastSineTransformerTest.java Wed Nov 30 06:33:57 2011
@@ -49,7 +49,7 @@ public final class FastSineTransformerTe
Assert.assertEquals(y[i], result[i], tolerance);
}
- result = transformer.inversetransform(y);
+ result = transformer.inverseTransform(y);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(x[i], result[i], tolerance);
}
@@ -61,7 +61,7 @@ public final class FastSineTransformerTe
Assert.assertEquals(x[i], result[i], tolerance);
}
- result = transformer.inversetransform2(x);
+ result = transformer.inverseTransform2(x);
for (int i = 0; i < result.length; i++) {
Assert.assertEquals(y[i], result[i], tolerance);
}