Class SmoothingFunction

  • All Implemented Interfaces:
    BinaryFunction<java.lang.Double,​java.lang.Double,​java.lang.Double>

    public class SmoothingFunction
    extends java.lang.Object
    implements BinaryFunction<java.lang.Double,​java.lang.Double,​java.lang.Double>
    A function that smoothes two values with a smooting factor, i.e. given a smoothing factor X and two values y1, y2 it returns X * y1 + (1-X) * y2.
    Author:
    Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      SmoothingFunction​(double factor)
      Creates a new smoothing function with the given factor.
    • Method Summary

      Modifier and Type Method Description
      java.lang.Double eval​(java.lang.Double val1, java.lang.Double val2)
      Evaluates the function for the given elements.
      • Methods inherited from class java.lang.Object

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

      • SmoothingFunction

        public SmoothingFunction​(double factor)
        Creates a new smoothing function with the given factor.
        Parameters:
        factor - some smoothing factor.
    • Method Detail

      • eval

        public java.lang.Double eval​(java.lang.Double val1,
                                     java.lang.Double val2)
        Description copied from interface: BinaryFunction
        Evaluates the function for the given elements.
        Specified by:
        eval in interface BinaryFunction<java.lang.Double,​java.lang.Double,​java.lang.Double>
        Parameters:
        val1 - some element
        val2 - some element
        Returns:
        the value of the element.