Documentation of 'jsat.math.rootfinding.RootFinder' Java class
RootFinder
jsat.math.rootfinding

Interface RootFinder

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    Bisection, RiddersMethod, Secant, Zeroin


    public interface RootFinder
    extends java.io.Serializable
    This interface defines a general contract for the numerical computation of a root of a given function. A root of a function f is a point x for which f(x) = 0. A function may have any number of roots (including no roots).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      int guessesNeeded()
      Different root finding methods require different numbers of initial guesses.
      double root(double eps, int maxIterations, double[] initialGuesses, Function1D f)
      Attempts to numerical compute the root of a given function, such that f(args) = 0.
    • Method Detail

      • root

        double root(double eps,
                    int maxIterations,
                    double[] initialGuesses,
                    Function1D f)
        Attempts to numerical compute the root of a given function, such that f(args) = 0. Only one variable may be altered at a time
        Parameters:
        eps - the accuracy desired for the solution
        maxIterations - the maximum number of steps allowed before forcing a return of the current solution.
        initialGuesses - an array containing the initial guess values
        f - the function to find the root of
        pos - the index of the argument that will be allowed to alter in order to find the root. Starts from 0
        args - the values to be passed to the function as arguments
        Returns:
        the value of the variable at the index pos that makes the function return 0
      • guessesNeeded

        int guessesNeeded()
        Different root finding methods require different numbers of initial guesses. Some root finding methods require 2 guesses, each with values of opposite sign so that they bracket the root. Others just need any 2 initial guesses sufficiently close to the root. This method simply returns the number of guesses that are needed.
        Returns:
        the number of initial guesses this root finding method needs

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.