Package com.google.common.math
Class LinearTransformation.LinearTransformationBuilder
java.lang.Object
com.google.common.math.LinearTransformation.LinearTransformationBuilder
- Enclosing class:
LinearTransformation
This is an intermediate stage in the construction process. It is returned by
LinearTransformation.mapping(double, double)
. You almost certainly don't want to keep instances around, but
instead use method chaining. This represents a single point mapping, i.e. a mapping between one
x
and y
value pair.- Since:
- 20.0
-
Field Details
-
x1
private final double x1 -
y1
private final double y1
-
-
Constructor Details
-
LinearTransformationBuilder
private LinearTransformationBuilder(double x1, double y1)
-
-
Method Details
-
and
Finish building an instance which also mapsx = x2
toy = y2
. These values must not both be identical to the values given in the first mapping. If only thex
values are identical, the transformation is vertical. If only they
values are identical, the transformation is horizontal (i.e. the slope is zero). -
withSlope
Finish building an instance with the given slope, i.e. the rate of change ofy
with respect tox
. The slope must not beNaN
. It may be infinite, in which case the transformation is vertical. (If it is zero, the transformation is horizontal.)
-