Class AbstractMathTransform.Inverse
- All Implemented Interfaces:
Parameterized, LenientComparable, Printable, MathTransform
- Direct Known Subclasses:
AbstractMathTransform1D.Inverse, AbstractMathTransform2D.Inverse
- Enclosing class:
AbstractMathTransform
Base class for implementations of inverse math transforms.
Subclasses need to implement the
inverse() method.
Serialization
This object may or may not be serializable, at implementation choices. Most Apache SIS implementations are serializable, but the serialized objects 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.- Since:
- 0.5
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.InverseModifier and TypeClassDescriptionprotected static classBase class for implementations of inverse math transforms. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intComputes a hash value for this transform.derivative(DirectPosition point) Gets the derivative of this transform at a point.booleanequals(Object object, ComparisonMode mode) Compares the specified object with this inverse math transform for equality.protected StringFormats the inner part of a Well Known Text version 1 (WKT 1) element.getDomain(DomainDefinition criteria) Returns the ranges of coordinate values which can be used as inputs.intGets the dimension of input points.intGets the dimension of output points.abstract MathTransforminverse()Returns the inverse of this math transform.booleanTests whether this transform does not move any points.Methods inherited from class AbstractMathTransform
equals, getContextualParameters, getParameterDescriptors, getParameterValues, getStandardType, hashCode, transform, transform, transform, transform, transform, transform, tryConcatenateModifier and TypeMethodDescriptionfinal booleanCompares the specified object with this math transform for strict equality.protected ContextualParametersReturns the parameters for a sequence of normalize →this→ denormalize transforms (optional operation).Returns the parameter descriptors for this math transform, ornullif unknown.Returns the parameter values for this math transform, ornullif unknown.final TypeReturns the class that defines the public properties of this instance.final intReturns a hash value for this transform.abstract Matrixtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) Transforms a single coordinate tuple in an array, and optionally computes the transform derivative at that location.voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms a list of coordinate tuples.voidtransform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms a list of coordinate tuples.voidtransform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms a list of coordinate tuples.voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms a list of coordinate tuples.transform(DirectPosition ptSrc, DirectPosition ptDst) Transforms the specifiedptSrcand stores the result inptDst.protected voidtryConcatenate(TransformJoiner context) Concatenates in an optimized way this math transform with its neighbor, if possible.Methods inherited from class FormattableObject
print, toString, toString, toWKTModifier and TypeMethodDescriptionvoidprint()Prints a string representation of this object to the standard output stream.Returns a Well Known Text (WKT) or an alternative text representation for this object.toString(Convention convention) Returns a Well Known Text (WKT) for this object using the specified convention.toWKT()Returns a strictly compliant Well Known Text (WKT) using the default convention, symbols and indentation.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface MathTransform
toWKT
-
Constructor Details
-
Inverse
protected Inverse()Constructs an inverse math transform.
-
-
Method Details
-
getSourceDimensions
public int getSourceDimensions()Gets the dimension of input points. The default implementation returns the dimension of output points of the inverse math transform.- Specified by:
getSourceDimensionsin interfaceMathTransform- Specified by:
getSourceDimensionsin classAbstractMathTransform- Returns:
- the number of dimensions of input points.
- See Also:
-
getTargetDimensions
public int getTargetDimensions()Gets the dimension of output points. The default implementation returns the dimension of input points of the inverse math transform.- Specified by:
getTargetDimensionsin interfaceMathTransform- Specified by:
getTargetDimensionsin classAbstractMathTransform- Returns:
- the number of dimensions of output points.
- See Also:
-
getDomain
Returns the ranges of coordinate values which can be used as inputs. The default implementation invokesinverse().getDomain(criteria)and transforms the returned envelope.- Overrides:
getDomainin classAbstractMathTransform- Parameters:
criteria- controls the definition of transform domain.- Returns:
- estimation of a domain where this transform is considered numerically applicable.
- Throws:
TransformException- if the domain cannot be estimated.- Since:
- 1.3
- See Also:
-
derivative
Gets the derivative of this transform at a point. The default implementation computes the inverse of the matrix returned by the inverse math transform.- Specified by:
derivativein interfaceMathTransform- Overrides:
derivativein classAbstractMathTransform- Parameters:
point- the coordinate tuple where to evaluate the derivative.- Returns:
- the derivative at the specified point (never
null). - Throws:
NullPointerException- if the derivative depends on coordinates andpointisnull.MismatchedDimensionException- ifpointdoes not have the expected dimension.TransformException- if the derivative cannot be evaluated at the specified point.
-
inverse
Returns the inverse of this math transform. The returned transform should be the enclosing math transform.- Specified by:
inversein interfaceMathTransform- Overrides:
inversein classAbstractMathTransform- Returns:
- the inverse of this transform.
-
isIdentity
public boolean isIdentity()Tests whether this transform does not move any points. The default implementation delegates this tests to the inverse math transform.- Specified by:
isIdentityin interfaceMathTransform- Overrides:
isIdentityin classAbstractMathTransform- Returns:
- whether this transform does not move any points.
-
computeHashCode
protected int computeHashCode()Computes a hash value for this transform. This method is invoked byAbstractMathTransform.hashCode()when first needed.- Overrides:
computeHashCodein classAbstractMathTransform- Returns:
- the hash code value. This value may change between different execution of the Apache SIS library.
-
equals
Compares the specified object with this inverse math transform for equality. The default implementation tests ifobjectin an instance of the same class asthis, and if so compares their inverseMathTransform.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classAbstractMathTransform- Parameters:
object- the object to compare with this transform.mode- the strictness level of the comparison. Default toSTRICT.- Returns:
trueif the given object is considered equals to this math transform.- See Also:
-
formatTo
Formats the inner part of a Well Known Text version 1 (WKT 1) element. If this inverse math transform has any parameter values, then this method formats the WKT as in the super-class method. Otherwise this method formats the math transform as an"Inverse_MT"entity.Compatibility note
Param_MTandInverse_MTare defined in the WKT 1 specification only.- Overrides:
formatToin classAbstractMathTransform- Parameters:
formatter- the formatter to use.- Returns:
- the WKT element name, which is
"Param_MT"or"Inverse_MT"in the default implementation. - See Also:
-