public class LongPostOffsetTransform extends Object implements IScalarAffineTransform
IScalarAffineTransform used as the inverse of LongPreOffsetTransform to avoid
losing the precision of the long offset. Otherwise similar to SimpleAffineTransform.| Constructor and Description |
|---|
LongPostOffsetTransform(double multiplier,
long offset) |
| Modifier and Type | Method and Description |
|---|---|
IScalarAffineTransform |
concat(IScalarAffineTransform innerTransform)
Concatenate this transform with
innerTransform, such that applying the resulting
transform is equivalent to first applying innerTransform and then applying this
transform on the resulting value. |
boolean |
equals(Object other) |
double |
getMultiplier() |
Number |
getOffset() |
int |
hashCode() |
IScalarAffineTransform |
invert() |
IScalarAffineTransform |
invertAndConcat(IScalarAffineTransform innerTransform)
Concatenate the inverse of this transform with
innerTransform, such that applying the
resulting transform is equivalent to first applying innerTransform and then applying
this inverse of this transform on the resulting value. |
boolean |
isInteger() |
boolean |
isUnity() |
double |
targetFloor(double srcNumericalValue) |
long |
targetFloor(long srcNumericalValue) |
int |
targetIntFloor(Number srcNumericalValue) |
Number |
targetNumber(long srcNumericalValue) |
Number |
targetNumber(Number srcNumericalValue) |
boolean |
targetOutOfRange(double srcNumericalValue,
long maxAbsValue) |
boolean |
targetOutOfRange(long srcNumericalValue,
long maxAbsValue) |
double |
targetValue(double srcNumericalValue) |
long |
targetValue(long srcNumericalValue) |
public LongPostOffsetTransform(double multiplier,
long offset)
public Number getOffset()
getOffset in interface IScalarAffineTransformmultiplier)public double getMultiplier()
getMultiplier in interface IScalarAffineTransformoffset is added)public boolean targetOutOfRange(long srcNumericalValue,
long maxAbsValue)
targetOutOfRange in interface IScalarAffineTransformpublic boolean targetOutOfRange(double srcNumericalValue,
long maxAbsValue)
targetOutOfRange in interface IScalarAffineTransformpublic long targetValue(long srcNumericalValue)
targetValue in interface IScalarAffineTransformsrcNumericalValue - a numerical quantity value, expressed in the source unitlongpublic long targetFloor(long srcNumericalValue)
targetFloor in interface IScalarAffineTransformsrcNumericalValue - a numerical quantity value, expressed in the source unitlongpublic double targetFloor(double srcNumericalValue)
targetFloor in interface IScalarAffineTransformsrcNumericalValue - a numerical quantity value, expressed in the source unitpublic int targetIntFloor(Number srcNumericalValue)
targetIntFloor in interface IScalarAffineTransformsrcNumericalValue - a numerical quantity value, expressed in the source unitintpublic Number targetNumber(long srcNumericalValue)
targetNumber in interface IScalarAffineTransformsrcNumericalValue - an exact numerical quantity value, expressed in the source unitLong if it can exactly be represented in one, otherwise as some other
Number with at least the precision of doublepublic Number targetNumber(Number srcNumericalValue)
targetNumber in interface IScalarAffineTransformsrcNumericalValue - an exact or inexact numerical quantity value, expressed in the source unitLong if it can exactly be represented in one, otherwise as some other
Number with at least the precision of doublepublic double targetValue(double srcNumericalValue)
targetValue in interface IScalarAffineTransformsrcNumericalValue - a numerical quantity value, expressed in the source unitpublic IScalarAffineTransform invert()
invert in interface IScalarAffineTransformpublic boolean isUnity()
isUnity in interface IScalarAffineTransformpublic boolean isInteger()
isInteger in interface IScalarAffineTransformpublic IScalarAffineTransform concat(IScalarAffineTransform innerTransform)
IScalarAffineTransforminnerTransform, such that applying the resulting
transform is equivalent to first applying innerTransform and then applying this
transform on the resulting value. That is, R(v) = T(I(v)), where R(v) is the resulting
transform, T(v) is this transform, and I(v) is innerTransform.
In this snippet, v1 and v2 should be equal, apart from numerical precision,
for any v.
IScalarAffineTransform R, T = ..., I = ...; double v = ...; R = T.concat(I); double v1 = R.targetValue(v); double v2 = T.targetValue(I.targetValue(v));
concat in interface IScalarAffineTransforminnerTransform - the transform that should be applied before this transformpublic IScalarAffineTransform invertAndConcat(IScalarAffineTransform innerTransform)
IScalarAffineTransforminnerTransform, such that applying the
resulting transform is equivalent to first applying innerTransform and then applying
this inverse of this transform on the resulting value. That is, R(v) = T-1(I(v)),
where R(v) is the resulting transform, T-1(v) is the inverse of this transform,
and I(v) is innerTransform.
In this snippet, v1 and v2 should be equal, apart from numerical precision,
for any v.
IScalarAffineTransform R, T = ..., I = ...; double v = ...; R = T.invertAndConcat(I); double v1 = R.targetValue(v); double v2 = T.invert().targetValue(I.targetValue(v));
invertAndConcat in interface IScalarAffineTransforminnerTransform - the transform that should be applied before this transformCopyright © 2019. All rights reserved.