|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultDomainElement1D
DefaultPiecewiseTransform1DElement
public class DefaultPiecewiseTransform1DElement
Convenience implementation of the DefaultPiecewiseTransform1DElement
.
Constructor Summary | |
---|---|
protected |
DefaultPiecewiseTransform1DElement(CharSequence name,
NumberRange<? extends Number> valueRange)
Protected constructor for DomainElement1D s that want to build their
transform later on. |
protected |
DefaultPiecewiseTransform1DElement(CharSequence name,
NumberRange<? extends Number> valueRange,
MathTransform1D transform)
Public constructor for building a DomainElement1D which applies the
specified transformation on the values that fall into its definition
range. |
Method Summary | |
---|---|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name)
Creates a pass-through DefaultPiecewiseTransform1DElement. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
NumberRange<? extends Number> valueRange)
Creates a pass-through DefaultPiecewiseTransform1DElement. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
NumberRange<? extends Number> inRange,
byte value)
Builds up a DefaultPiecewiseTransform1DElement which maps a range to a constant value. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
NumberRange<? extends Number> inRange,
double value)
Builds up a DefaultPiecewiseTransform1DElement which maps a range to a constant value. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
NumberRange<? extends Number> inRange,
int value)
Builds up a DefaultPiecewiseTransform1DElement which maps a range to a constant value. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
NumberRange<? extends Number> inRange,
NumberRange<? extends Number> outRange)
Constructor. |
static DefaultPiecewiseTransform1DElement |
create(String string,
NumberRange<? extends Number> range,
MathTransform1D mathTransform1D)
|
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 obj)
Implementation of Object.equals(Object) for DomainElement1D s. |
protected Class<?> |
getEquivalenceClass()
|
int |
getSourceDimensions()
Gets the dimension of input points. |
int |
getTargetDimensions()
Gets the dimension of output points. |
protected MathTransform1D |
getTransform()
Getter for the underlying MathTransform1D . |
int |
hashCode()
Returns a hash value for this domain element. |
MathTransform1D |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
protected void |
setInverse(MathTransform1D mathTransform)
|
protected void |
setTransform(MathTransform1D transform)
|
String |
toString()
|
String |
toWKT()
Returns a Well Known Text (WKT) for this object. |
DirectPosition |
transform(DirectPosition ptSrc,
DirectPosition ptDst)
Transforms the specified ptSrc and stores the result in
ptDst . |
double |
transform(double value)
Transforms the specified value. |
void |
transform(double[] arg0,
int arg1,
double[] arg2,
int arg3,
int arg4)
Transforms a list of coordinate point ordinal values. |
void |
transform(double[] arg0,
int arg1,
float[] arg2,
int arg3,
int arg4)
Transforms a list of coordinate point ordinal values. |
void |
transform(float[] arg0,
int arg1,
double[] arg2,
int arg3,
int arg4)
Transforms a list of coordinate point ordinal values. |
void |
transform(float[] arg0,
int arg1,
float[] arg2,
int arg3,
int arg4)
Transforms a list of coordinate point ordinal values. |
Methods inherited from class DefaultDomainElement1D |
---|
compareTo, contains, contains, contains, getInputMaximum, getInputMinimum, getName, getRange, isInputMaximumInfinite, isInputMaximumNaN, isInputMinimumInfinite, isInputMinimumNaN |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface DomainElement1D |
---|
contains, contains, contains, getName, getRange |
Methods inherited from interface Comparable |
---|
compareTo |
Constructor Detail |
---|
protected DefaultPiecewiseTransform1DElement(CharSequence name, NumberRange<? extends Number> valueRange) throws IllegalArgumentException
DomainElement1D
s that want to build their
transform later on.
name
- for this DomainElement1D
.valueRange
- for this DomainElement1D
.
IllegalArgumentException
protected DefaultPiecewiseTransform1DElement(CharSequence name, NumberRange<? extends Number> valueRange, MathTransform1D transform) throws IllegalArgumentException
DomainElement1D
which applies the
specified transformation on the values that fall into its definition
range.
name
- for this DomainElement1D
.valueRange
- for this DomainElement1D
.transform
- for this DomainElement1D
.
IllegalArgumentException
Method Detail |
---|
public static DefaultPiecewiseTransform1DElement create(CharSequence name, NumberRange<? extends Number> inRange, double value)
DefaultPiecewiseTransform1DElement
which maps a range to a constant value.
name
- for this DomainElement1D
inRange
- for this DomainElement1D
outVal
- for this DefaultLinearPiecewiseTransform1DElement
IllegalArgumentException
- in case the input values are illegal.public static DefaultPiecewiseTransform1DElement create(CharSequence name, NumberRange<? extends Number> inRange, byte value)
name
- for this DomainElement1D
inRange
- for this DomainElement1D
outVal
- for this DefaultLinearPiecewiseTransform1DElement
IllegalArgumentException
- in case the input values are illegal.public static DefaultPiecewiseTransform1DElement create(CharSequence name, NumberRange<? extends Number> inRange, int value)
name
- for this DomainElement1D
inRange
- for this DomainElement1D
outVal
- for this DefaultLinearPiecewiseTransform1DElement
IllegalArgumentException
- in case the input values are illegal.public static DefaultPiecewiseTransform1DElement create(CharSequence name, NumberRange<? extends Number> inRange, NumberRange<? extends Number> outRange)
name
- for this DefaultLinearPiecewiseTransform1DElement
.inRange
- for this DefaultLinearPiecewiseTransform1DElement
.outRange
- for this DefaultLinearPiecewiseTransform1DElement
.public static DefaultPiecewiseTransform1DElement create(CharSequence name) throws IllegalArgumentException
name
- for this DomainElement1D
.
IllegalArgumentException
public static DefaultPiecewiseTransform1DElement create(CharSequence name, NumberRange<? extends Number> valueRange) throws IllegalArgumentException
name
- for this DomainElement1D
.valueRange
- for this DomainElement1D
.
IllegalArgumentException
public String toWKT() throws UnsupportedOperationException
toWKT
in interface MathTransform
UnsupportedOperationException
- If this object can't be formatted as WKT.
XXX Not yet implemented.protected MathTransform1D getTransform()
MathTransform1D
.
MathTransform1D
.public double transform(double value) throws TransformException
transform
in interface MathTransform1D
value
- The value to transform.
TransformException
- if the value can't be transformed.public double derivative(double value) throws TransformException
derivative
in interface MathTransform1D
value
- The value where to evaluate the derivative.
TransformException
- if the derivative can't be evaluated at the specified point.public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws TransformException
ptSrc
and stores the result in
ptDst
.
transform
in interface MathTransform
ptSrc
- the specified coordinate point to be transformed.ptDst
- the specified coordinate point that stores the result of transforming
ptSrc
, or null
.
ptSrc
and storing the result
in ptDst
, or a newly created point if ptDst
was null.
TransformException
- if the point can't be transformed.public Matrix derivative(DirectPosition point) throws TransformException
derivative
in interface MathTransform
point
- The coordinate point where to evaluate the derivative. Null
value is accepted only if the derivative is the same everywhere.
For example affine transform accept null value since they produces
identical derivative no matter the coordinate value. But most map
projection will requires a non-null value.
null
).
This method never returns an internal object: changing the matrix
will not change the state of this math transform.
TransformException
- if the derivative can't be evaluated at the
specified point.public void transform(double[] arg0, int arg1, double[] arg2, int arg3, int arg4) throws TransformException
MathTransform
transform
in interface MathTransform
arg0
- the array containing the source point coordinates.arg1
- the offset to the first point to be transformed in the source array.arg2
- the array into which the transformed point coordinates are returned.
May be the same than srcPts
.arg3
- the offset to the location of the first transformed point that is
stored in the destination array.arg4
- the number of point objects to be transformed.
TransformException
- if a point can't be transformed. Some implementations will stop
at the first failure, wile some other implementations will fill the untransformable
points with NaN values, continue and throw the exception
only at end. Implementations that fall in the later case should set the last completed transform to this
.public void transform(float[] arg0, int arg1, float[] arg2, int arg3, int arg4) throws TransformException
MathTransform
transform
in interface MathTransform
arg0
- the array containing the source point coordinates.arg1
- the offset to the first point to be transformed in the source array.arg2
- the array into which the transformed point coordinates are returned.
May be the same than srcPts
.arg3
- the offset to the location of the first transformed point that is
stored in the destination array.arg4
- the number of point objects to be transformed.
TransformException
- if a point can't be transformed. Some implementations will stop
at the first failure, wile some other implementations will fill the untransformable
points with NaN values, continue and throw the exception
only at end. Implementations that fall in the later case should set the last completed transform to this
.public void transform(float[] arg0, int arg1, double[] arg2, int arg3, int arg4) throws TransformException
MathTransform
transform
in interface MathTransform
arg0
- the array containing the source point coordinates.arg1
- the offset to the first point to be transformed in the source array.arg2
- the array into which the transformed point coordinates are returned.arg3
- the offset to the location of the first transformed point that is
stored in the destination array.arg4
- the number of point objects to be transformed.
TransformException
- if a point can't be transformed. Some implementations will stop
at the first failure, wile some other implementations will fill the untransformable
points with NaN values, continue and throw the exception
only at end. Implementations that fall in the later case should set the last completed transform to this
.public void transform(double[] arg0, int arg1, float[] arg2, int arg3, int arg4) throws TransformException
MathTransform
transform
in interface MathTransform
arg0
- the array containing the source point coordinates.arg1
- the offset to the first point to be transformed in the source array.arg2
- the array into which the transformed point coordinates are returned.arg3
- the offset to the location of the first transformed point that is
stored in the destination array.arg4
- the number of point objects to be transformed.
TransformException
- if a point can't be transformed. Some implementations will stop
at the first failure, wile some other implementations will fill the untransformable
points with NaN values, continue and throw the exception
only at end. Implementations that fall in the later case should set the last completed transform to this
.public int getSourceDimensions()
MathTransform
getSourceDimensions
in interface MathTransform
public int getTargetDimensions()
MathTransform
getTargetDimensions
in interface MathTransform
public MathTransform1D inverse() throws NoninvertibleTransformException
MathTransform1D
inverse
in interface MathTransform
inverse
in interface MathTransform1D
NoninvertibleTransformException
- if the transform can't be inversed.public boolean isIdentity()
MathTransform
isIdentity
in interface MathTransform
true
if this MathTransform
is
an identity transform; false
otherwise.protected void setInverse(MathTransform1D mathTransform)
mathTransform
- protected void setTransform(MathTransform1D transform)
transform
- public boolean equals(Object obj)
DefaultDomainElement1D
Object.equals(Object)
for DomainElement1D
s.
Two DefaultDomainElement1D
s are considered to be equal if they have
the same inputr range and the same name.
equals
in interface DomainElement1D
equals
in class DefaultDomainElement1D
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.Object.equals(Object)
public String toString()
toString
in class DefaultDomainElement1D
protected Class<?> getEquivalenceClass()
getEquivalenceClass
in class DefaultDomainElement1D
public int hashCode()
DefaultDomainElement1D
hashCode
in class DefaultDomainElement1D
public static DefaultPiecewiseTransform1DElement create(String string, NumberRange<? extends Number> range, MathTransform1D mathTransform1D)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |