public class Zeroin extends Object implements RootFinder
Constructor and Description |
---|
Zeroin() |
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 a,
double b,
int pos,
Function f,
double... args)
Performs root finding on the function
f . |
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 a, double b, int pos, Function f, double... args)
f
.eps
- the desired accuracy of the resultmaxIterations
- the maximum number of iterations to performa
- the left bound on the rootb
- the right bound on the rootpos
- the position of the argument array that should be used as the variable to alterf
- the function to find the root ofargs
- the array of variable values for the function, one of which will be altered in the searchpos
that produces a zero value outputpublic 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.