Class JxnMultivariateFunction

    • Constructor Detail

      • JxnMultivariateFunction

        public JxnMultivariateFunction​(KmgFormelInterpreter fi,
                                       String cmd)
        Constructs a MultivariateFunction instance to be used by Commons Math algorithms.
        Example:
            mvf = @JxnMultivariateFunction( $this, "( $x[0]^2 + 2.5 $x[1]^2 - $x[1] ) * Math.exp( 1 - $x[0]^2 - $x[1]^2 );" )
        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 array 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 MultivariateFunction