Package com.google.common.math
Class LinearTransformation.LinearTransformationBuilder
- java.lang.Object
-
- com.google.common.math.LinearTransformation.LinearTransformationBuilder
-
- Enclosing class:
- LinearTransformation
public static final class LinearTransformation.LinearTransformationBuilder extends Object
This is an intermediate stage in the construction process. It is returned byLinearTransformation.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 onex
andy
value pair.- Since:
- 20.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearTransformation
and(double x2, double y2)
Finish building an instance which also mapsx = x2
toy = y2
.LinearTransformation
withSlope(double slope)
Finish building an instance with the given slope, i.e. the rate of change ofy
with respect tox
.
-
-
-
Method Detail
-
and
public LinearTransformation and(double x2, double y2)
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
public LinearTransformation withSlope(double slope)
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.)
-
-