public class RiddersMethod extends Object implements RootFinder
Constructor and Description |
---|
RiddersMethod() |
Modifier and Type | Method and Description |
---|---|
int |
guessesNeeded()
Different root finding methods require different numbers of initial guesses.
|
static double |
root(double eps,
double a,
double b,
Function f,
double... args) |
static double |
root(double eps,
double a,
double b,
int pos,
Function f,
double... args) |
static double |
root(double a,
double b,
Function f,
double... args) |
double |
root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
double... args)
Attempts to numerical compute the root of a given function, such that f(args) = 0.
|
double |
root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args)
Attempts to numerical compute the root of a given function, such that f(args) = 0.
|
static double |
root(double eps,
int maxIterations,
double x1,
double x2,
int pos,
Function f,
double... args) |
public static double root(double a, double b, Function f, double... args)
public static double root(double eps, double a, double b, Function f, double... args)
public static double root(double eps, double a, double b, int pos, Function f, double... args)
public static double root(double eps, int maxIterations, double x1, double x2, int pos, Function f, double... args)
public double root(double eps, int maxIterations, double[] initialGuesses, Function f, int pos, double... args)
RootFinder
root
in interface RootFinder
eps
- the accuracy desired for the solutionmaxIterations
- the maximum number of steps allowed before forcing a return of the current solution.initialGuesses
- an array containing the initial guess valuesf
- the function to find the root ofpos
- the index of the argument that will be allowed to alter in order to find the root. Starts from 0args
- the values to be passed to the function as argumentspublic double root(double eps, int maxIterations, double[] initialGuesses, Function f, int pos, Vec args)
RootFinder
root
in interface RootFinder
eps
- the accuracy desired for the solutionmaxIterations
- the maximum number of steps allowed before forcing a return of the current solution.initialGuesses
- an array containing the initial guess valuesf
- the function to find the root ofpos
- the index of the argument that will be allowed to alter in order to find the root. Starts from 0args
- the values to be passed to the function as argumentspublic int guessesNeeded()
RootFinder
guessesNeeded
in interface RootFinder
Copyright © 2017. All rights reserved.