private static final class LinearTransformation.VerticalLinearTransformation extends LinearTransformation
LinearTransformation.LinearTransformationBuilder
Modifier and Type | Field and Description |
---|---|
(package private) LinearTransformation |
inverse |
(package private) double |
x |
Constructor and Description |
---|
VerticalLinearTransformation(double x) |
VerticalLinearTransformation(double x,
LinearTransformation inverse) |
Modifier and Type | Method and Description |
---|---|
private LinearTransformation |
createInverse() |
LinearTransformation |
inverse()
Returns the inverse linear transformation.
|
boolean |
isHorizontal()
Returns whether this is a horizontal transformation.
|
boolean |
isVertical()
Returns whether this is a vertical transformation.
|
double |
slope()
Returns the slope of the transformation, i.e.
|
java.lang.String |
toString() |
double |
transform(double x)
Returns the
y corresponding to the given x . |
forNaN, horizontal, mapping, vertical
final double x
LinearTransformation inverse
VerticalLinearTransformation(double x)
VerticalLinearTransformation(double x, LinearTransformation inverse)
public boolean isVertical()
LinearTransformation
isVertical
in class LinearTransformation
public boolean isHorizontal()
LinearTransformation
isHorizontal
in class LinearTransformation
public double slope()
LinearTransformation
y
with respect to
x
. This must not be called on a vertical transformation (i.e. when
LinearTransformation.isVertical()
is true).slope
in class LinearTransformation
public double transform(double x)
LinearTransformation
y
corresponding to the given x
. This must not be called on a
vertical transformation (i.e. when LinearTransformation.isVertical()
is true).transform
in class LinearTransformation
public LinearTransformation inverse()
LinearTransformation
LinearTransformation.forNaN()
transformation is
itself. In all other cases, the inverse is a transformation such that applying both the
original transformation and its inverse to a value gives you the original value give-or-take
numerical errors. Calling this method multiple times on the same instance will always return
the same instance. Calling this method on the result of calling this method on an instance will
always return that original instance.inverse
in class LinearTransformation
public java.lang.String toString()
toString
in class java.lang.Object
private LinearTransformation createInverse()