Class LinearTransformation.LinearTransformationBuilder

  • Enclosing class:
    LinearTransformation

    public static final class LinearTransformation.LinearTransformationBuilder
    extends java.lang.Object
    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.
    • 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 maps x = x2 to y = y2.
      LinearTransformation withSlope​(double slope)
      Finish building an instance with the given slope, i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.)