public class DefaultPiecewiseTransform1DElement extends DefaultDomainElement1D implements PiecewiseTransform1DElement
DefaultPiecewiseTransform1DElement
.Constructor and Description |
---|
DefaultPiecewiseTransform1DElement(CharSequence name,
Range valueRange)
Protected constructor for
DomainElement1D s that want to build their transform later on. |
DefaultPiecewiseTransform1DElement(CharSequence name,
Range valueRange,
MathTransformation transform)
Public constructor for building a
DomainElement1D which applies the specified transformation on the values that fall into its
definition range. |
Modifier and Type | Method and Description |
---|---|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name)
Creates a pass-through DefaultPiecewiseTransform1DElement.
|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
Range valueRange)
Creates a pass-through DefaultPiecewiseTransform1DElement.
|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
Range inRange,
byte value)
Builds up a DefaultPiecewiseTransform1DElement which maps a range to a constant value.
|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
Range inRange,
double value)
Builds up a
DefaultPiecewiseTransform1DElement which maps a range to a constant value. |
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
Range inRange,
int value)
Builds up a DefaultPiecewiseTransform1DElement which maps a range to a constant value.
|
static DefaultPiecewiseTransform1DElement |
create(CharSequence name,
Range inRange,
Range outRange)
Constructor.
|
static DefaultPiecewiseTransform1DElement |
create(String string,
Range range,
MathTransformation mathTransform1D) |
boolean |
equals(Object obj)
Implementation of
Object.equals(Object) for DomainElement1D s. |
protected Class<?> |
getEquivalenceClass() |
int |
getSourceDimensions()
Returns the input transformation dimensions
|
int |
getTargetDimensions()
Returns the output transformation dimensions
|
protected MathTransformation |
getTransform()
Getter for the underlying
MathTransformation . |
int |
hashCode()
Returns a hash value for this domain element.
|
MathTransformation |
inverse()
Returns the inverse of this
MathTransformation instance |
boolean |
isIdentity()
Defines if the transformation is an identity
|
protected void |
setInverse(MathTransformation mathTransform) |
protected void |
setTransform(MathTransformation transform) |
double |
transform(double value)
Transforms the specified value.
|
Position |
transform(Position ptSrc,
Position ptDst)
Transforms the specified
ptSrc and stores the result in ptDst . |
compareTo, contains, contains, contains, getInputMaximum, getInputMinimum, getName, getRange, isInputMaximumInfinite, isInputMaximumNaN, isInputMinimumInfinite, isInputMinimumNaN, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, contains, contains, getName, getRange
compareTo
public DefaultPiecewiseTransform1DElement(CharSequence name, Range valueRange) throws IllegalArgumentException
DomainElement1D
s that want to build their transform later on.name
- for this DomainElement1D
.valueRange
- for this DomainElement1D
.IllegalArgumentException
public DefaultPiecewiseTransform1DElement(CharSequence name, Range valueRange, MathTransformation 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
public static DefaultPiecewiseTransform1DElement create(CharSequence name, Range 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, Range 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, Range 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, Range inRange, Range 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, Range valueRange) throws IllegalArgumentException
name
- for this DomainElement1D
.valueRange
- for this DomainElement1D
.IllegalArgumentException
protected MathTransformation getTransform()
MathTransformation
.MathTransformation
.public double transform(double value) throws TransformationException
transform
in interface PiecewiseTransform1DElement
value
- The value to transform.TransformationException
- if the value can't be transformed.public Position transform(Position ptSrc, Position ptDst) throws TransformationException
ptSrc
and stores the result in ptDst
.TransformationException
public int getSourceDimensions()
public int getTargetDimensions()
public MathTransformation inverse() throws NoninvertibleTransformException
MathTransformation
instanceNoninvertibleTransformException
public boolean isIdentity()
protected void setInverse(MathTransformation mathTransform)
mathTransform
- protected void setTransform(MathTransformation 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)
protected Class<?> getEquivalenceClass()
getEquivalenceClass
in class DefaultDomainElement1D
public int hashCode()
DefaultDomainElement1D
hashCode
in class DefaultDomainElement1D
public static DefaultPiecewiseTransform1DElement create(String string, Range range, MathTransformation mathTransform1D)
Copyright © 2006–2017 GeoSolutions. All rights reserved.