Package com.google.common.math
Class LinearTransformation.NaNLinearTransformation
java.lang.Object
com.google.common.math.LinearTransformation
com.google.common.math.LinearTransformation.NaNLinearTransformation
- Enclosing class:
- LinearTransformation
private static final class LinearTransformation.NaNLinearTransformation
extends LinearTransformation
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.math.LinearTransformation
LinearTransformation.LinearTransformationBuilder -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final LinearTransformation.NaNLinearTransformation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninverse()Returns the inverse linear transformation.booleanReturns whether this is a horizontal transformation.booleanReturns whether this is a vertical transformation.doubleslope()Returns the slope of the transformation, i.e.toString()doubletransform(double x) Returns theycorresponding to the givenx.Methods inherited from class com.google.common.math.LinearTransformation
forNaN, horizontal, mapping, vertical
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NaNLinearTransformation
private NaNLinearTransformation()
-
-
Method Details
-
isVertical
public boolean isVertical()Description copied from class:LinearTransformationReturns whether this is a vertical transformation.- Specified by:
isVerticalin classLinearTransformation
-
isHorizontal
public boolean isHorizontal()Description copied from class:LinearTransformationReturns whether this is a horizontal transformation.- Specified by:
isHorizontalin classLinearTransformation
-
slope
public double slope()Description copied from class:LinearTransformationReturns the slope of the transformation, i.e. the rate of change ofywith respect tox. This must not be called on a vertical transformation (i.e. whenLinearTransformation.isVertical()is true).- Specified by:
slopein classLinearTransformation
-
transform
public double transform(double x) Description copied from class:LinearTransformationReturns theycorresponding to the givenx. This must not be called on a vertical transformation (i.e. whenLinearTransformation.isVertical()is true).- Specified by:
transformin classLinearTransformation
-
inverse
Description copied from class:LinearTransformationReturns the inverse linear transformation. The inverse of a horizontal transformation is a vertical transformation, and vice versa. The inverse of theLinearTransformation.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.- Specified by:
inversein classLinearTransformation
-
toString
-