Interface ScalarFunctionND


  • public interface ScalarFunctionND
    A class that defines an n-Dimensional scalar function y = fn(x[1..n]) (named "function") that can be called by math tools such as a function minimizer. Also defines the derivatives of the function in each dimension: (dy/dx)[1..n] = d fn(x[1..n])/dx (oddly enough, named "derivatives").

    Modified by: Joseph A. Huwaldt

    Version:
    July 9, 2010
    Author:
    Joseph A. Huwaldt Date: July 9, 2010
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean derivatives​(double[] x, double[] dydx)
      User supplied method that calculates the derivatives of the function: (dy/dx)[1..n] = d( fn(x[1..n]))/dx.
      double function​(double[] x)
      User supplied method that calculates the function y = fn(x[1..n]).
    • Method Detail

      • function

        double function​(double[] x)
                 throws RootException
        User supplied method that calculates the function y = fn(x[1..n]).
        Parameters:
        x - Independent parameters to the function, passed in as input.
        Returns:
        The scalar function value for the provided list of inputs.
        Throws:
        RootException
      • derivatives

        boolean derivatives​(double[] x,
                            double[] dydx)
        User supplied method that calculates the derivatives of the function: (dy/dx)[1..n] = d( fn(x[1..n]))/dx.
        Parameters:
        x - Independent parameters to the function, passed in as input.
        dydx - Existing array that is filled in with the derivatives of the function with respect to each variable x[i].
        Returns:
        true if the derivatives were computed by this method, false if they were not.