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
Author:
Pete Gillin
  • Method Details

    • and

      public LinearTransformation and(double x2, double y2)
      Finish building an instance which also maps x = x2 to y = y2. These values must not both be identical to the values given in the first mapping. If only the x values are identical, the transformation is vertical. If only the y 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 of y with respect to x. The slope must not be NaN. It may be infinite, in which case the transformation is vertical. (If it is zero, the transformation is horizontal.)