Author: desruisseaux
Date: Tue Jun 10 10:36:56 2014
New Revision: 1601600
URL: http://svn.apache.org/r1601600
Log:
Initial port of LogarithmicTransform1D and ExponentialTransform1D.
Will need revision - we may simplify LogarithmicTransform1D by fixing the base
to 10 or e,
which are the majority of cases. Other cases can be handled by concatenating a
LinearTransform1D.
Added:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
(with props)
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
(with props)
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
(with props)
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
(with props)
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PassThroughTransformTest.java
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?rev=1601600&r1=1601599&r2=1601600&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -818,7 +818,7 @@ public abstract class AbstractMathTransf
public final boolean equals(final Object object) {
final boolean eq = equals(object, ComparisonMode.STRICT);
// If objects are equal, then they must have the same hash code value.
- assert !eq || hashCode() == object.hashCode() : this;
+ assert !eq || computeHashCode() == ((AbstractMathTransform)
object).computeHashCode() : this;
return eq;
}
Added:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java?rev=1601600&view=auto
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
(added)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -0,0 +1,307 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.transform;
+
+import java.io.Serializable;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransform1D;
+import org.apache.sis.internal.util.Numerics;
+import org.apache.sis.util.ComparisonMode;
+
+
+/**
+ * A one dimensional exponential transform.
+ * Input values <var>x</var> are converted into output values <var>y</var>
using the following equation:
+ *
+ * <blockquote><var>y</var> = {@linkplain #scale} ⋅ {@linkplain
#base}<sup><var>x</var></sup></blockquote>
+ *
+ * <div class="note"><b>Tip:</b> if a linear transform is applied before this
exponential transform,
+ * then the equation can be rewritten as:
+ *
+ * <blockquote><code>scale</code> ⋅ <code>base</code><sup><var>a</var> +
<var>b</var>⋅<var>x</var></sup>
+ * = <code>scale</code> ⋅ <code>base</code><sup><var>a</var></sup> ⋅
+ *
(<code>base</code><sup><var>b</var></sup>)<sup><var>x</var></sup></blockquote>
+ *
+ * It is possible to find back the coefficients of the original linear
transform by
+ * pre-concatenating a logarithmic transform before the exponential one, as
below:
+ *
+ * {@preformat java
+ * LinearTransform1D linear = (LinearTransform1D)
ConcatenatedTransform.create(exponentialTransform,
+ * LogarithmicTransform1D.create(base, -Math.log(scale) /
Math.log(base)));
+ * }
+ * </div>
+ *
+ * {@section Serialization}
+ * Serialized instances of this class are not guaranteed to be compatible with
future SIS versions.
+ * Serialization should be used only for short term storage or RMI between
applications running the
+ * same SIS version.
+ *
+ * @author Martin Desruisseaux (IRD, Geomatys)
+ * @since 0.5 (derived from geotk-2.0)
+ * @version 0.5
+ * @module
+ */
+final class ExponentialTransform1D extends AbstractMathTransform1D implements
Serializable {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 5331178990358868947L;
+
+ /**
+ * The base to be raised to a power.
+ */
+ protected final double base;
+
+ /**
+ * Natural logarithm of {@link #base}.
+ */
+ final double lnBase;
+
+ /**
+ * The scale value to be multiplied.
+ *
+ * <div class="note">The scale could be handled by a concatenation with
{@link LinearTransform1D} instead than
+ * an explicit field in this class. However the <var>scale</var> ⋅
<var>base</var><sup><var>x</var></sup> formula
+ * is extensively used as a <cite>transfer function</cite> in grid
coverages. Consequently we keep this explicit
+ * field for performance reasons.</div>
+ */
+ protected final double scale;
+
+ /**
+ * The inverse of this transform. Created only when first needed.
Serialized in order to avoid
+ * rounding error if this transform is actually the one which was created
from the inverse.
+ */
+ private MathTransform1D inverse;
+
+ /**
+ * Constructs a new exponential transform which is the
+ * inverse of the supplied logarithmic transform.
+ */
+ ExponentialTransform1D(final LogarithmicTransform1D inverse) {
+ this.base = inverse.base;
+ this.lnBase = inverse.lnBase;
+ this.scale = Math.pow(base, -inverse.offset);
+ this.inverse = inverse;
+ }
+
+ /**
+ * Constructs a new exponential transform. This constructor is provided
for subclasses only.
+ * Instances should be created using the {@linkplain #create(double,
double) factory method},
+ * which may returns optimized implementations for some particular
argument values.
+ *
+ * @param base The base to be raised to a power.
+ * @param scale The scale value to be multiplied.
+ */
+ protected ExponentialTransform1D(final double base, final double scale) {
+ this.base = base;
+ this.scale = scale;
+ this.lnBase = Math.log(base);
+ }
+
+ /**
+ * Constructs a new exponential transform which include the given scale
factor applied
+ * after the exponentiation.
+ *
+ * @param base The base to be raised to a power.
+ * @param scale The scale value to be multiplied.
+ * @return The math transform.
+ */
+ public static MathTransform1D create(final double base, final double
scale) {
+ if (base == 0 || scale == 0) {
+ return LinearTransform1D.create(0, 0);
+ }
+ if (base == 1) {
+ return LinearTransform1D.create(scale, 0);
+ }
+ return new ExponentialTransform1D(base, scale);
+ }
+
+ /**
+ * Creates the inverse transform of this object.
+ */
+ @Override
+ public synchronized MathTransform1D inverse() {
+ if (inverse == null) {
+ inverse = LogarithmicTransform1D.create(this);
+ // Above method will set LogarithmicTransform1D.inverse = this.
+ }
+ return inverse;
+ }
+
+ /**
+ * Gets the derivative of this function at a value.
+ */
+ @Override
+ public double derivative(final double value) {
+ return lnBase * transform(value);
+ }
+
+ /**
+ * Transforms the specified value.
+ */
+ @Override
+ public double transform(final double value) {
+ return scale * Math.pow(base, value);
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final double[]
dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = scale * Math.pow(base, srcPts[srcOff++]);
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = scale * Math.pow(base, srcPts[--srcOff]);
+ }
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (scale * Math.pow(base,
srcPts[srcOff++]));
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = (float) (scale * Math.pow(base,
srcPts[--srcOff]));
+ }
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (scale * Math.pow(base,
srcPts[srcOff++]));
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final double[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = scale * Math.pow(base, srcPts[srcOff++]);
+ }
+ }
+
+ /**
+ * Concatenates in an optimized way a {@link MathTransform} {@code other}
to this
+ * {@code MathTransform}. This implementation can optimize some
concatenation with
+ * {@link LinearTransform1D} and {@link LogarithmicTransform1D}.
+ *
+ * @param other The math transform to apply.
+ * @param applyOtherFirst {@code true} if the transformation order is
{@code other}
+ * followed by {@code this}, or {@code false} if the
transformation order is
+ * {@code this} followed by {@code other}.
+ * @return The combined math transform, or {@code null} if no optimized
combined
+ * transform is available.
+ */
+ @Override
+ final MathTransform concatenate(final MathTransform other, final boolean
applyOtherFirst) {
+ if (other instanceof LinearTransform) {
+ final LinearTransform1D linear = (LinearTransform1D) other;
+ if (applyOtherFirst) {
+ final double newBase = Math.pow(base, linear.scale);
+ final double newScale = Math.pow(base, linear.offset) * scale;
+ if (!Double.isNaN(newBase) && !Double.isNaN(newScale)) {
+ return create(newBase, newScale);
+ }
+ } else {
+ if (linear.offset == 0) {
+ return create(base, scale * linear.scale);
+ }
+ }
+ } else if (other instanceof LogarithmicTransform1D) {
+ return concatenateLog((LogarithmicTransform1D) other,
applyOtherFirst);
+ }
+ return super.concatenate(other, applyOtherFirst);
+ }
+
+ /**
+ * Concatenates in an optimized way a {@link LogarithmicTransform1D}
{@code other}
+ * to this {@code ExponentialTransform1D}.
+ *
+ * @param other The math transform to apply.
+ * @param applyOtherFirst {@code true} if the transformation order is
{@code other}
+ * followed by {@code this}, or {@code false} if the
transformation order is
+ * {@code this} followed by {@code other}.
+ * @return The combined math transform, or {@code null} if no optimized
combined
+ * transform is available.
+ */
+ final MathTransform concatenateLog(final LogarithmicTransform1D other,
final boolean applyOtherFirst) {
+ if (applyOtherFirst) {
+ return MathTransforms.concatenate(
+ PowerTransform1D.create(lnBase / other.lnBase),
+ LinearTransform1D.create(scale * Math.pow(base,
other.offset), 0));
+ } else {
+ final double newScale = lnBase / other.lnBase;
+ final double newOffset;
+ if (scale > 0) {
+ newOffset = other.log(scale) + other.offset;
+ } else {
+ // Maybe the Math.log(...) argument will become
+ // positive if we rewrite the equation that way...
+ newOffset = other.log(scale * other.offset * other.lnBase);
+ }
+ if (!Double.isNaN(newOffset)) {
+ return LinearTransform1D.create(newScale, newOffset);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected int computeHashCode() {
+ return Numerics.hashCode(Double.doubleToLongBits(base) +
+ 31 * Double.doubleToLongBits(scale)) ^
super.computeHashCode();
+ }
+
+ /**
+ * Compares the specified object with this math transform for equality.
+ */
+ @Override
+ public boolean equals(final Object object, final ComparisonMode mode) {
+ if (object == this) {
+ return true; // Optimization for a common case.
+ }
+ if (super.equals(object, mode)) {
+ final ExponentialTransform1D that = (ExponentialTransform1D)
object;
+ return Numerics.equals(this.base, that.base) &&
+ Numerics.equals(this.scale, that.scale);
+ }
+ return false;
+ }
+}
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java?rev=1601600&view=auto
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
(added)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -0,0 +1,367 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.transform;
+
+import java.io.Serializable;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransform1D;
+import org.apache.sis.internal.util.Numerics;
+import org.apache.sis.util.ArgumentChecks;
+import org.apache.sis.util.ComparisonMode;
+
+
+/**
+ * A one dimensional, logarithmic transform. This transform is the inverse of
{@link ExponentialTransform1D}.
+ * Input values <var>x</var> are converted into output values <var>y</var>
using the following equation:
+ *
+ * <blockquote><table class="compact" summary="y = offset + log(x)">
+ * <tr><td><var>y</var></td><td> = </td><td>{@linkplain #offset} +
log<sub>{@linkplain #base}</sub>(<var>x</var>)</td></tr>
+ * <tr><td> </td><td> = </td><td>{@linkplain #offset} +
ln(<var>x</var>) / ln({@linkplain #base})</td></tr>
+ * </table></blockquote>
+ *
+ * {@section Serialization}
+ * Serialized instances of this class are not guaranteed to be compatible with
future SIS versions.
+ * Serialization should be used only for short term storage or RMI between
applications running the
+ * same SIS version.
+ *
+ * @author Martin Desruisseaux (IRD, Geomatys)
+ * @since 0.5 (derived from geotk-2.0)
+ * @version 0.5
+ * @module
+ */
+class LogarithmicTransform1D extends AbstractMathTransform1D implements
Serializable {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 1535101265352133948L;
+
+ /**
+ * The logarithm base.
+ */
+ protected final double base;
+
+ /**
+ * Natural logarithm of {@link #base}.
+ */
+ final double lnBase;
+
+ /**
+ * The offset to add to the logarithm.
+ *
+ * <span class="note"><b>Note:</b> the offset could be handled by a
concatenation with {@link LinearTransform1D}.
+ * instead than an explicit field in this class. However the
<var>offset</var> + log<sub>base</sub>(<var>x</var>)
+ * formula is extensively used as a <cite>transfer function</cite> in grid
coverages. Consequently we keep this
+ * explicit field for performance reasons.</span>
+ */
+ protected final double offset;
+
+ /**
+ * The inverse of this transform. Created only when first needed.
Serialized in order to avoid
+ * rounding error if this transform is actually the one which was created
from the inverse.
+ */
+ private MathTransform1D inverse;
+
+ /**
+ * Constructs a new logarithmic transform which is the
+ * inverse of the supplied exponential transform.
+ *
+ * @see #create(ExponentialTransform1D)
+ */
+ private LogarithmicTransform1D(final ExponentialTransform1D inverse) {
+ this.base = inverse.base;
+ this.lnBase = inverse.lnBase;
+ this.offset = -Math.log(inverse.scale) / lnBase;
+ this.inverse = inverse;
+ }
+
+ /**
+ * Constructs a new logarithmic transform. This constructor is provided
for subclasses only.
+ * Instances should be created using the {@linkplain #create(double,
double) factory method},
+ * which may return optimized implementations for some particular argument
values.
+ *
+ * @param base The base of the logarithm (typically 10).
+ * @param offset The offset to add to the logarithm.
+ */
+ protected LogarithmicTransform1D(final double base, final double offset) {
+ ArgumentChecks.ensureStrictlyPositive("base", base);
+ this.base = base;
+ this.offset = offset;
+ this.lnBase = Math.log(base);
+ }
+
+ /**
+ * Constructs a new logarithmic transform which include the given offset
after the logarithm.
+ *
+ * @param base The base of the logarithm (typically 10).
+ * @param offset The offset to add to the logarithm.
+ * @return The math transform.
+ */
+ public static MathTransform1D create(final double base, final double
offset) {
+ if (base == 10) {
+ return new Base10(offset);
+ }
+ if (base == 0) {
+ // offset + ln(x) / ln(0) = offset + ln(x) / -∞ = offset +
-0 for 0 < x < ∞
+ return LinearTransform1D.create(-0.0, offset);
+ }
+ if (base == Double.POSITIVE_INFINITY) {
+ // offset + ln(x) / ln(∞) = offset + ln(x) / +∞ = offset +
0 for 0 < x < ∞
+ return LinearTransform1D.create(+0.0, offset);
+ }
+ return new LogarithmicTransform1D(base, offset);
+ }
+
+ /**
+ * Constructs a new logarithmic transform which is the inverse of the
supplied exponential transform.
+ */
+ static LogarithmicTransform1D create(final ExponentialTransform1D inverse)
{
+ if (inverse.base == 10) {
+ return new Base10(inverse);
+ }
+ return new LogarithmicTransform1D(inverse);
+ }
+
+ /**
+ * Creates the inverse transform of this object.
+ */
+ @Override
+ public synchronized MathTransform1D inverse() {
+ if (inverse == null) {
+ inverse = new ExponentialTransform1D(this);
+ // Above constructor will set ExponentialTransform1D.inverse =
this.
+ }
+ return inverse;
+ }
+
+ /**
+ * Gets the derivative of this function at a value.
+ */
+ @Override
+ public double derivative(final double value) {
+ return 1 / (lnBase * value);
+ }
+
+ /**
+ * Returns the logarithm of the given value in the base given to this
transform constructor.
+ * This method is similar to {@link #transform(double)} except that the
offset is not added.
+ *
+ * @param value The value for which to compute the log.
+ * @return The log of the given value in the base used by this transform.
+ */
+ double log(final double value) {
+ return Math.log(value) / lnBase;
+ }
+
+ /**
+ * Transforms the specified value.
+ */
+ @Override
+ public double transform(final double value) {
+ return Math.log(value) / lnBase + offset;
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final double[]
dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = Math.log(srcPts[srcOff++]) / lnBase +
offset;
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = Math.log(srcPts[--srcOff]) / lnBase +
offset;
+ }
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (Math.log(srcPts[srcOff++]) /
lnBase + offset);
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = (float) (Math.log(srcPts[--srcOff]) /
lnBase + offset);
+ }
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (Math.log(srcPts[srcOff++]) / lnBase +
offset);
+ }
+ }
+
+ /**
+ * Transforms many coordinates in a list of ordinal values.
+ */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final double[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = Math.log(srcPts[srcOff++]) / lnBase + offset;
+ }
+ }
+
+ /**
+ * Special case for base 10 taking advantage of extra precision provided
by {@link Math#log10(double)}.
+ */
+ private static final class Base10 extends LogarithmicTransform1D {
+ /** For cross-version compatibility. */
+ private static final long serialVersionUID = -5435804027536647558L;
+
+ /** Constructs the inverse of the supplied exponential transform. */
+ Base10(final ExponentialTransform1D inverse) {
+ super(inverse);
+ }
+
+ /** Creates a new instance with the given offset. */
+ protected Base10(final double offset) {
+ super(10, offset);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ double log(final double value) {
+ return Math.log10(value);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public double transform(final double value) {
+ return Math.log10(value) + offset;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final
double[] dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = Math.log10(srcPts[srcOff++]) + offset;
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = Math.log10(srcPts[srcOff++]) + offset;
+ }
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ if (srcPts != dstPts || srcOff >= dstOff) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (Math.log10(srcPts[srcOff++]) +
offset);
+ }
+ } else {
+ srcOff += numPts;
+ dstOff += numPts;
+ while (--numPts >= 0) {
+ dstPts[--dstOff] = (float) (Math.log10(srcPts[srcOff++]) +
offset);
+ }
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void transform(final double[] srcPts, int srcOff, final float[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = (float) (Math.log10(srcPts[srcOff++]) +
offset);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void transform(final float[] srcPts, int srcOff, final double[]
dstPts, int dstOff, int numPts) {
+ while (--numPts >= 0) {
+ dstPts[dstOff++] = Math.log10(srcPts[srcOff++]) + offset;
+ }
+ }
+ }
+
+ /**
+ * Concatenates in an optimized way a {@link MathTransform} {@code other}
to this
+ * {@code MathTransform}. This implementation can optimize some
concatenation with
+ * {@link LinearTransform1D} and {@link ExponentialTransform1D}.
+ *
+ * @param other The math transform to apply.
+ * @param applyOtherFirst {@code true} if the transformation order is
{@code other}
+ * followed by {@code this}, or {@code false} if the
transformation order is
+ * {@code this} followed by {@code other}.
+ * @return The combined math transform, or {@code null} if no optimized
combined
+ * transform is available.
+ */
+ @Override
+ final MathTransform concatenate(final MathTransform other, final boolean
applyOtherFirst) {
+ if (other instanceof LinearTransform) {
+ final LinearTransform1D linear = (LinearTransform1D) other;
+ if (applyOtherFirst) {
+ if (linear.offset == 0 && linear.scale > 0) {
+ return create(base, Math.log(linear.scale) / lnBase +
offset);
+ }
+ } else {
+ final double newBase = Math.pow(base, 1 / linear.scale);
+ if (!Double.isNaN(newBase)) {
+ return create(newBase, linear.scale * offset +
linear.offset);
+ }
+ }
+ } else if (other instanceof ExponentialTransform1D) {
+ return ((ExponentialTransform1D) other).concatenateLog(this,
!applyOtherFirst);
+ }
+ return super.concatenate(other, applyOtherFirst);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected int computeHashCode() {
+ return Numerics.hashCode(Double.doubleToLongBits(base) +
+ 31 * Double.doubleToLongBits(offset)) ^
super.computeHashCode();
+ }
+
+ /**
+ * Compares the specified object with this math transform for equality.
+ */
+ @Override
+ public boolean equals(final Object object, final ComparisonMode mode) {
+ if (object == this) {
+ return true; // Optimization for a common case.
+ }
+ if (super.equals(object, mode)) {
+ final LogarithmicTransform1D that = (LogarithmicTransform1D)
object;
+ return Numerics.equals(this.base, that.base) &&
+ Numerics.equals(this.offset, that.offset);
+ }
+ return false;
+ }
+}
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java?rev=1601600&r1=1601599&r2=1601600&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -69,11 +69,15 @@ public class PassThroughTransform extend
/**
* Index of the first affected ordinate.
+ *
+ * @see #getModifiedCoordinates()
*/
final int firstAffectedOrdinate;
/**
* Number of unaffected ordinates after the affected ones.
+ *
+ * @see #getModifiedCoordinates()
*/
final int numTrailingOrdinates;
@@ -253,9 +257,16 @@ public class PassThroughTransform extend
* Returns the ordered sequence of positive integers defining the
positions in a source
* coordinate tuple of the coordinates affected by this pass-through
operation.
*
+ * <div class="note"><b>API note:</b> this method is final for now because
most of Apache SIS code do
+ * not use the {@code modifiedCoordinates} array. Instead, SIS uses the
{@code firstAffectedOrdinate}
+ * and {@code numTrailingOrdinates} information provided to the
constructor. Consequently overriding
+ * this method may be misleading since it would be ignored by SIS. We do
not want to make the "really
+ * used" fields public in order to keep the flexibility to replace them by
a {@code modifiedCoordinates}
+ * array in a future SIS version.</div>
+ *
* @return Indices of the modified source coordinates.
*/
- public int[] getModifiedCoordinates() {
+ public final int[] getModifiedCoordinates() {
final int[] index = new int[subTransform.getSourceDimensions()];
for (int i=0; i<index.length; i++) {
index[i] = i + firstAffectedOrdinate;
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java?rev=1601600&r1=1601599&r2=1601600&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -31,6 +31,11 @@ import org.apache.sis.util.ComparisonMod
* <p>Before to make this class public (if we do), we need to revisit the
class name, define
* parameters and improve the {@link #concatenate(MathTransform, boolean)}
method.</p>
*
+ * {@section Serialization}
+ * Serialized instances of this class are not guaranteed to be compatible with
future SIS versions.
+ * Serialization should be used only for short term storage or RMI between
applications running the
+ * same SIS version.
+ *
* @author Martin Desruisseaux (Geomatys)
* @since 0.5 (derived from geotk-3.17)
* @version 0.5
@@ -192,7 +197,7 @@ final class PowerTransform1D extends Abs
@Override
public boolean equals(final Object object, final ComparisonMode mode) {
if (object == this) {
- return true; // Slight optimization
+ return true; // Optimization for a common case.
}
if (super.equals(object, mode)) {
return Numerics.equals(power, ((PowerTransform1D) object).power);
Added:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java?rev=1601600&view=auto
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
(added)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.transform;
+
+import java.io.Serializable;
+import org.opengis.metadata.content.TransferFunctionType;
+import org.opengis.referencing.operation.MathTransform1D;
+import org.apache.sis.util.resources.Errors;
+
+
+/**
+ * The function converting <cite>sample values</cite> in a raster to
<cite>geophysics values</cite>.
+ * The function is usually linear, but can sometime be logarithmic or
exponential. The later occur
+ * most often when measuring concentration of something.
+ *
+ * <table class="sis">
+ * <caption>Supported transfer functions</caption>
+ * <tr><th>Type</th><th>Equation</th></tr>
+ * <tr><td>{@link TransferFunctionType#LINEAR LINEAR}</td>
+ * <td><var>y</var> = scale⋅<var>x</var> + offset</td></tr>
+ * <tr><td>{@link TransferFunctionType#LOGARITHMIC LOGARITHMIC}</td>
+ * <td><var>y</var> = scale⋅<b>log</b><sub>base</sub>(<var>x</var>) +
offset</td></tr>
+ * <tr><td>{@link TransferFunctionType#EXPONENTIAL EXPONENTIAL}</td>
+ * <td><var>y</var> = scale⋅base<sup><var>x</var></sup> +
offset</td></tr>
+ * </table>
+ *
+ * {@section Missing values}
+ * This {@code TransferFunction} class handles only the continuous part of
transfer functions.
+ * This class does <strong>not</strong> handle missing values other than
{@code NaN}.
+ * For a more complete class with support for non-NaN missing values,
+ * see {@link org.apache.sis.coverage.grid.GridSampleDimension}.
+ *
+ * {@section Serialization}
+ * Serialized instances of this class are not guaranteed to be compatible with
future SIS versions.
+ * Serialization should be used only for short term storage or RMI between
applications running the
+ * same SIS version.
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.5
+ * @version 0.5
+ * @module
+ */
+public class TransferFunction implements Cloneable, Serializable {
+ /**
+ * Whether the function is linear, logarithmic or exponential.
+ */
+ private TransferFunctionType type;
+
+ /**
+ * The logarithmic base. Ignored if {@link #type} is {@code LINEAR}.
+ */
+ private double base;
+
+ /**
+ * The scale factor, or {@code NaN} if unknown.
+ */
+ private double scale;
+
+ /**
+ * The scale factor, or {@code NaN} if unknown.
+ */
+ private double offset;
+
+ /**
+ * The transform created from above information, or {@code null} if not
yet created.
+ * Conversely, may be the transform given to the constructor from which
above information
+ * were inferred.
+ *
+ * <p>This field is serialized because the transform may be a
user-provided one.</p>
+ */
+ private MathTransform1D transform;
+
+ /**
+ * Creates a transfer function initialized to the identity transform.
+ */
+ public TransferFunction() {
+ type = TransferFunctionType.LINEAR;
+ base = 10;
+ scale = 1;
+ }
+
+ /**
+ * Returns the transfer function type (linear, logarithmic or exponential).
+ *
+ * @return The transfer function type.
+ */
+ public TransferFunctionType getType() {
+ return type;
+ }
+
+ /**
+ * Sets the transfer function type.
+ * The default value is {@link TransferFunctionType#LINEAR}.
+ *
+ * @param type The transfer function type.
+ */
+ public void setType(final TransferFunctionType type) {
+ this.type = type;
+ transform = null;
+ }
+
+ /**
+ * Returns the logarithm or exponent base in the transfer function.
+ * This value is always 1 for {@link TransferFunctionType#LINEAR},
+ * and usually (but not necessarily) 10 for the other types.
+ *
+ * @return The logarithmic or exponent base.
+ */
+ public double getBase() {
+ return TransferFunctionType.LINEAR.equals(type) ? 1 : base;
+ }
+
+ /**
+ * Sets the logarithm or exponent base in the transfer function.
+ * This value is ignored for {@link TransferFunctionType#LINEAR}.
+ * For other supported types, the default value is 10.
+ *
+ * @param base The new logarithm or exponent base.
+ */
+ public void setBase(final double base) {
+ this.base = base;
+ transform = null;
+ }
+
+ /**
+ * Returns the scale factor of the transfer function.
+ *
+ * @return The scale factor.
+ */
+ public double getScale() {
+ return scale;
+ }
+
+ /**
+ * Sets the scale factor of the transfer function.
+ * The default value is 1.
+ *
+ * @param scale The new scale factor.
+ */
+ public void setScale(final double scale) {
+ this.scale = scale;
+ transform = null;
+ }
+
+ /**
+ * Returns the offset of the transfer function.
+ *
+ * @return The offset.
+ */
+ public double getOffset() {
+ return offset;
+ }
+
+ /**
+ * Sets the offset of the transfer function.
+ * The default value is 0.
+ *
+ * @param offset The new offset.
+ */
+ public void setOffset(final double offset) {
+ this.offset = offset;
+ transform = null;
+ }
+
+ /**
+ * Returns the transform from sample values to geophysics values, as
specified by the
+ * current properties of this {@code TransferFunction}.
+ *
+ * @return The transform from sample to geophysics values.
+ */
+ public MathTransform1D getTransform() {
+ if (transform == null) {
+ if (TransferFunctionType.LINEAR.equals(type)) {
+ transform = LinearTransform1D.create(scale, offset);
+ } else if (TransferFunctionType.EXPONENTIAL.equals(type)) {
+ transform = ExponentialTransform1D.create(base, scale);
+ if (offset != 0) { // Rarely occurs in practice.
+ transform = (MathTransform1D) ConcatenatedTransform.create(
+ transform, LinearTransform1D.create(0, offset));
+ }
+ } else if (TransferFunctionType.LOGARITHMIC.equals(type)) {
+ if (scale == 1) {
+ transform = LogarithmicTransform1D.create(base, offset);
+ } else {
+ /*
+ * This case rarely occurs in practice, so we do not
provide optimized constructor.
+ * The ExponentialTransform1D.concatenate(…) method will
rewrite the equation using
+ * mathematical identities. The result will be a function
with a different base.
+ */
+ transform = (MathTransform1D) ConcatenatedTransform.create(
+ LogarithmicTransform1D.create(base, 0),
+ LinearTransform1D.create(scale, offset));
+ }
+ } else {
+ throw new
IllegalStateException(Errors.format(Errors.Keys.UnknownType_1, type));
+ }
+ }
+ return transform;
+ }
+}
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransferFunction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java?rev=1601600&view=auto
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
(added)
+++
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.transform;
+
+import org.opengis.referencing.operation.MathTransform1D;
+import org.opengis.referencing.operation.TransformException;
+import org.apache.sis.test.DependsOn;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static java.lang.StrictMath.*;
+
+
+/**
+ * Tests the {@link ExponentialTransform1D} class. This test case will also
tests
+ * indirectly the {@link LogarithmicTransform1D} class since it is the inverse
of
+ * the exponential transform.
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.5 (derived from geotk-3.17)
+ * @version 0.5
+ * @module
+ */
+@DependsOn(LinearTransformTest.class)
+public final strictfp class ExponentialTransform1DTest extends
MathTransformTestCase {
+ /**
+ * Arbitrary coefficients used for this test.
+ */
+ private static final double BASE = 10, SCALE = 2, C0 = -3, C1 = 0.25;
+
+ /**
+ * A simple (non-concatenated) test case.
+ *
+ * @throws TransformException should never happen.
+ */
+ @Test
+ public void testSimple() throws TransformException {
+ transform = ExponentialTransform1D.create(BASE, SCALE);
+ validate();
+ assertFalse(transform.isIdentity());
+ final double[] source =
generateRandomCoordinates(CoordinateDomain.GAUSSIAN, 0);
+ final double[] target = new double[source.length];
+ for (int i=0; i<source.length; i++) {
+ target[i] = SCALE * pow(BASE, source[i]);
+ }
+ tolerance = 1E-12;
+ verifyTransform(source, target);
+ /*
+ * Tests the derivative at a single point.
+ */
+ tolerance = 0.002;
+ derivativeDeltas = new double[] {0.001};
+ verifyDerivative(2.5);
+ }
+
+ /**
+ * Tests the concatenation of a linear operation before the exponential
one.
+ *
+ * @throws TransformException should never happen.
+ */
+ @Test
+ public void testAffinePreConcatenation() throws TransformException {
+ transform = MathTransforms.concatenate(
+ LinearTransform1D.create(C1, C0),
+ ExponentialTransform1D.create(BASE, SCALE));
+ validate();
+ assertFalse(transform.isIdentity());
+ assertTrue("Expected mathematical identities.", transform instanceof
ExponentialTransform1D);
+ final double[] source =
generateRandomCoordinates(CoordinateDomain.GAUSSIAN, 0);
+ final double[] target = new double[source.length];
+ for (int i=0; i<source.length; i++) {
+ target[i] = SCALE * pow(BASE, C0 + C1 * source[i]);
+ }
+ tolerance = 1E-14;
+ verifyTransform(source, target);
+ /*
+ * Tests the derivative at a single point.
+ */
+ tolerance = 1E-9;
+ derivativeDeltas = new double[] {0.001};
+ verifyDerivative(2.5);
+ /*
+ * Find back the original linear coefficients as documented in the
ExpentionalTransform1D
+ * class javadoc. Then check that the transform results are the
expected ones.
+ */
+ final double lnBase = log(BASE);
+ final double offset = -log(SCALE) / lnBase;
+ final MathTransform1D log = LogarithmicTransform1D.create(BASE,
offset);
+ transform = (LinearTransform1D) MathTransforms.concatenate(transform,
log);
+ assertTrue("Expected mathematical identities.", transform instanceof
LinearTransform1D);
+ assertEquals(C1, ((LinearTransform1D) transform).scale, 1E-12);
+ assertEquals(C0, ((LinearTransform1D) transform).offset, 1E-12);
+ for (int i=0; i<source.length; i++) {
+ target[i] = log(target[i]) / lnBase + offset;
+ }
+ tolerance = 1E-14;
+ verifyTransform(source, target);
+ }
+
+ /**
+ * Tests the concatenation of a linear operation after the exponential one.
+ *
+ * @throws TransformException should never happen.
+ */
+ @Test
+ public void testAffinePostConcatenation() throws TransformException {
+ transform = MathTransforms.concatenate(
+ ExponentialTransform1D.create(BASE, SCALE),
+ LinearTransform1D.create(C1, C0));
+ validate();
+ assertFalse(transform.isIdentity());
+ final double[] source =
generateRandomCoordinates(CoordinateDomain.GAUSSIAN, 0);
+ final double[] target = new double[source.length];
+ for (int i=0; i<source.length; i++) {
+ target[i] = C0 + C1 * (SCALE * pow(BASE, source[i]));
+ }
+ tolerance = 1E-12;
+ verifyTransform(source, target);
+ /*
+ * Tests the derivative at a single point.
+ */
+ tolerance = 0.01;
+ derivativeDeltas = new double[] {0.001};
+ verifyDerivative(2.5);
+ }
+
+ /**
+ * Tests the concatenation of a logarithmic operation with the exponential
one.
+ *
+ * @throws TransformException should never happen.
+ */
+ @Test
+ public void testLogarithmicConcatenation() throws TransformException {
+ final double offset = -3;
+ final double base = 8;
+ final double lnBase = log(base);
+ transform = MathTransforms.concatenate(
+ LogarithmicTransform1D.create(base, offset),
+ ExponentialTransform1D.create(BASE, SCALE));
+ validate();
+ assertFalse(transform.isIdentity());
+ final double[] source =
generateRandomCoordinates(CoordinateDomain.GAUSSIAN, 0);
+ final double[] target = new double[source.length];
+ for (int i=0; i<source.length; i++) {
+ source[i] = abs(source[i]) + 0.001;
+ target[i] = SCALE * pow(BASE, log(source[i]) / lnBase + offset);
+ }
+ tolerance = 1E-14;
+ verifyTransform(source, target);
+ /*
+ * Tests the derivative at a single point.
+ */
+ tolerance = 1E-10;
+ derivativeDeltas = new double[] {0.001};
+ verifyDerivative(2.5);
+ }
+}
Propchange:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1DTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Modified:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PassThroughTransformTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PassThroughTransformTest.java?rev=1601600&r1=1601599&r2=1601600&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PassThroughTransformTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PassThroughTransformTest.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -44,7 +44,10 @@ import org.opengis.test.ToleranceModifie
* @version 0.5
* @module
*/
-@DependsOn(LinearTransformTest.class)
+@DependsOn({
+ LinearTransformTest.class,
+ ExponentialTransform1DTest.class
+})
public final strictfp class PassThroughTransformTest extends
MathTransformTestCase {
/**
* The random number generator to be used in this test.
Modified:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1601600&r1=1601599&r2=1601600&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] Tue Jun 10 10:36:56 2014
@@ -44,6 +44,7 @@ import org.junit.BeforeClass;
org.apache.sis.referencing.operation.transform.AbstractMathTransformTest.class,
org.apache.sis.referencing.operation.transform.ProjectiveTransformTest.class,
org.apache.sis.referencing.operation.transform.LinearTransformTest.class,
+
org.apache.sis.referencing.operation.transform.ExponentialTransform1DTest.class,
org.apache.sis.referencing.operation.transform.CopyTransformTest.class,
org.apache.sis.referencing.operation.transform.PassThroughTransformTest.class,