Class GaussianFunction

    • Constructor Detail

      • GaussianFunction

        public GaussianFunction​(double a,
                                double b,
                                double c,
                                double d)
        Constructs an instance with the specified parameters.
        Parameters:
        a - a parameter value
        b - b parameter value
        c - c parameter value
        d - d parameter value
        Throws:
        IllegalArgumentException - if d is 0
      • GaussianFunction

        public GaussianFunction​(double[] parameters)
        Constructs an instance with the specified parameters.
        Parameters:
        parameters - a, b, c, and d parameter values
        Throws:
        IllegalArgumentException - if parameters is null, parameters length is not 4, or if parameters[3] is 0
    • Method Detail

      • value

        public double value​(double x)
        Compute the value for the function.
        Specified by:
        value in interface UnivariateRealFunction
        Parameters:
        x - the point for which the function value should be computed
        Returns:
        the value
      • getA

        public double getA()
        Gets a parameter value.
        Returns:
        a parameter value
      • getB

        public double getB()
        Gets b parameter value.
        Returns:
        b parameter value
      • getC

        public double getC()
        Gets c parameter value.
        Returns:
        c parameter value
      • getD

        public double getD()
        Gets d parameter value.
        Returns:
        d parameter value