Class JxnUnivariateFunction

    • Constructor Detail

      • JxnUnivariateFunction

        public JxnUnivariateFunction​(KmgFormelInterpreter fi,
                                     String cmd)
        Constructs an UnivariateFunction instance to be used by Commons Math algorithms.
        Example:
            uvf = @JxnUnivariateFunction( $this, "Math.sin $x;" )
        Parameters:
        fi - an internal copy of fi is used to execute cmd
        cmd - one or more statements separated by ';'. The command cmd must use the variable double $x to compute a result of type double. If cmd ends with ';', log output of intermediate steps is suppressed.
    • Method Detail

      • value

        public double value​(double x)
        Internally called by Commons Math algorithms: Computes the function value using the given argument x.
        Specified by:
        value in interface UnivariateFunction