org.geotoolkit.referencing.operation.transform
Class AbstractMathTransform1D
Object
FormattableObject
AbstractMathTransform
AbstractMathTransform1D
- All Implemented Interfaces:
- Formattable, Parameterized, LenientComparable, MathTransform, MathTransform1D
- Direct Known Subclasses:
- ExponentialTransform1D, LinearTransform1D, LogarithmicTransform1D
@ThreadSafe
public abstract class AbstractMathTransform1D
- extends AbstractMathTransform
- implements MathTransform1D
Base class for math transforms that are known to be one-dimensional in all cases.
One-dimensional math transforms are not required to extend this
class, however doing so may simplify their implementation.
- Since:
- 3.17
- Version:
- 3.18
- Author:
- Martin Desruisseaux (Geomatys)
- Module:
| Methods inherited from class AbstractMathTransform |
computeHashCode, createTransformedShape, derivative, ensureNonNull, equals, equals, formatWKT, getName, getParameterDescriptors, getParameterValues, hashCode, isIdentity, rollLongitude, transform, transform, transform, transform, transform, transform |
AbstractMathTransform1D
protected AbstractMathTransform1D()
- Constructs a default math transform.
getSourceDimensions
public final int getSourceDimensions()
- Returns the dimension of input points, which is always 1.
- Specified by:
getSourceDimensions in interface MathTransform- Specified by:
getSourceDimensions in class AbstractMathTransform
getTargetDimensions
public final int getTargetDimensions()
- Returns the dimension of output points, which is always 1.
- Specified by:
getTargetDimensions in interface MathTransform- Specified by:
getTargetDimensions in class AbstractMathTransform
transform
protected void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
throws TransformException
- Transforms a single point in the given array. The default implementation delegates to
MathTransform1D.transform(double). Subclasses may override this method for performance reason.
- Specified by:
transform in class AbstractMathTransform
- Parameters:
srcPts - The array containing the source point coordinates.srcOff - The offset to the point to be transformed in the source array.dstPts - the array into which the transformed point coordinate are returned.
May be the same than srcPts.dstOff - The offset to the location of the transformed point that is
stored in the destination array.
- Throws:
TransformException - If the point can't be transformed.
derivative
public Matrix derivative(DirectPosition point)
throws TransformException
- Gets the derivative of this transform at a point. The default implementation ensures that
point is one-dimensional, then delegates to MathTransform1D.derivative(double).
- Specified by:
derivative in interface MathTransform- Overrides:
derivative in class AbstractMathTransform
- Parameters:
point - The coordinate point where to evaluate the derivative, or null.
- Returns:
- The derivative at the specified point (never
null).
- Throws:
MismatchedDimensionException - if point doesn't have the expected dimension.
TransformException - if the derivative can't be evaluated at the specified point.
inverse
public MathTransform1D inverse()
throws NoninvertibleTransformException
- Returns the inverse transform of this object. The default implementation
returns
this if this transform is an identity transform, and throws
a NoninvertibleTransformException otherwise. Subclasses should override
this method.
- Specified by:
inverse in interface MathTransform- Specified by:
inverse in interface MathTransform1D- Overrides:
inverse in class AbstractMathTransform
- Throws:
NoninvertibleTransformException
Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.