Class LinearFunction

  • All Implemented Interfaces:
    Function

    public final class LinearFunction
    extends java.lang.Object
    implements Function
    Author:
    Michael Weiss
    • Constructor Summary

      Constructors 
      Constructor Description
      LinearFunction​(java.math.BigDecimal slope, java.math.BigDecimal yIntercept)  
      LinearFunction​(java.math.BigDecimal x, java.math.BigDecimal y, java.math.BigDecimal slope)  
      LinearFunction​(java.math.BigDecimal x1, java.math.BigDecimal y1, java.math.BigDecimal x2, java.math.BigDecimal y2)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int getSCALE()  
      java.math.BigDecimal getSlope()  
      java.math.BigDecimal getY​(java.math.BigDecimal x)  
      java.math.BigDecimal getyIntercept()  
      boolean isValid​(java.math.BigDecimal x, java.math.BigDecimal y)  
      static void setSCALE​(int scale)  
      • Methods inherited from class java.lang.Object

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

      • LinearFunction

        public LinearFunction​(java.math.BigDecimal x1,
                              java.math.BigDecimal y1,
                              java.math.BigDecimal x2,
                              java.math.BigDecimal y2)
      • LinearFunction

        public LinearFunction​(java.math.BigDecimal x,
                              java.math.BigDecimal y,
                              java.math.BigDecimal slope)
      • LinearFunction

        public LinearFunction​(java.math.BigDecimal slope,
                              java.math.BigDecimal yIntercept)
    • Method Detail

      • getY

        public java.math.BigDecimal getY​(java.math.BigDecimal x)
        Specified by:
        getY in interface Function
      • isValid

        public boolean isValid​(java.math.BigDecimal x,
                               java.math.BigDecimal y)
      • getSlope

        public java.math.BigDecimal getSlope()
      • getyIntercept

        public java.math.BigDecimal getyIntercept()
      • getSCALE

        public static int getSCALE()
      • setSCALE

        public static void setSCALE​(int scale)