|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFormattable
AbstractMathTransform
LinearTransform1D
public class LinearTransform1D
A one dimensional, linear transform. Input values x are converted into output values y using the following equation:
This class is the same as a 2×2 affine transform. However, this specializedLinearTransform1D
class is faster. It is defined there because extensively
used by GridCoverage2D
.
LogarithmicTransform1D
,
ExponentialTransform1D
,
Serialized Form
Nested Class Summary |
---|
Nested classes/interfaces inherited from class AbstractMathTransform |
---|
AbstractMathTransform.Inverse |
Field Summary | |
---|---|
static LinearTransform1D |
IDENTITY
The identity transform. |
double |
offset
The value to add to input values. |
double |
scale
The value which is multiplied to input values. |
Fields inherited from class Formattable |
---|
SINGLE_LINE |
Constructor Summary | |
---|---|
protected |
LinearTransform1D(double scale,
double offset)
Constructs a new linear transform. |
Method Summary | |
---|---|
static LinearTransform1D |
create(double scale,
double offset)
Constructs a new linear transform. |
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point. |
double |
derivative(double value)
Gets the derivative of this function at a value. |
boolean |
equals(Object object)
Compares the specified object with this math transform for equality. |
Matrix |
getMatrix()
Returns this transform as an affine transform matrix. |
ParameterDescriptorGroup |
getParameterDescriptors()
Returns the parameter descriptors for this math transform. |
ParameterValueGroup |
getParameterValues()
Returns the matrix elements as a group of parameters values. |
int |
getSourceDimensions()
Gets the dimension of input points, which is 1. |
int |
getTargetDimensions()
Gets the dimension of output points, which is 1. |
int |
hashCode()
Returns a hash value for this transform. |
MathTransform1D |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
boolean |
isIdentity(double tolerance)
Tests whether this transform does not move any points by using the provided tolerance. |
double |
transform(double value)
Transforms the specified value. |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values. |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values. |
Methods inherited from class AbstractMathTransform |
---|
createTransformedShape, derivative, ensureNonNull, formatWKT, getName, needCopy, rollLongitude, transform, transform, transform, transform |
Methods inherited from class Formattable |
---|
toString, toWKT, toWKT, toWKT |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface MathTransform |
---|
toWKT, transform |
Methods inherited from interface MathTransform |
---|
toWKT, transform |
Field Detail |
---|
public static final LinearTransform1D IDENTITY
public final double scale
public final double offset
Constructor Detail |
---|
protected LinearTransform1D(double scale, double offset)
scale
- The scale
term in the linear equation.offset
- The offset
term in the linear equation.Method Detail |
---|
public static LinearTransform1D create(double scale, double offset)
scale
- The scale
term in the linear equation.offset
- The offset
term in the linear equation.public ParameterDescriptorGroup getParameterDescriptors()
getParameterDescriptors
in class AbstractMathTransform
null
.OperationMethod.getParameters()
public ParameterValueGroup getParameterValues()
getParameterValues
in class AbstractMathTransform
Operation.getParameterValues()
public int getSourceDimensions()
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
public int getTargetDimensions()
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
public Matrix getMatrix()
getMatrix
in interface LinearTransform
public MathTransform1D inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
inverse
in interface MathTransform1D
inverse
in class AbstractMathTransform
NoninvertibleTransformException
public boolean isIdentity()
isIdentity
in interface MathTransform
isIdentity
in class AbstractMathTransform
public boolean isIdentity(double tolerance)
XMatrix.isIdentity(double)
.
isIdentity
in interface LinearTransform
tolerance
- The tolerance factor.
true
if this transform is the identity onepublic Matrix derivative(DirectPosition point) throws TransformException
AbstractMathTransform.derivative(java.awt.geom.Point2D)
implementation in that no
coordinate point is required and Double.NaN
may be a legal output value for
some users.
derivative
in interface MathTransform
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
null
).
TransformException
- if the derivative can't be evaluated at the
specified point.public double derivative(double value)
derivative
in interface MathTransform1D
public double transform(double value)
transform
in interface MathTransform1D
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
transform
in interface MathTransform
transform
in class AbstractMathTransform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
transform
in interface MathTransform
public int hashCode()
hashCode
in class AbstractMathTransform
public boolean equals(Object object)
equals
in class AbstractMathTransform
object
- The object to compare with this transform.
true
if the given object is a transform of the same class
and if, given identical source position, the
transformed
position would be the equals.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |