Class RootFindingFunctions
- java.lang.Object
-
- org.hortonmachine.gears.utils.math.rootfinding.RootFindingFunctions
-
public class RootFindingFunctions extends Object
Methods to find roots of a function.- Author:
- Daniele Andreis
-
-
Constructor Summary
Constructors Constructor Description RootFindingFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublebisectionRootFinding(ISingleArgmentFunction function, double bottomLimit, double upperLimit, double accuracy, double maxIterationNumber, IHMProgressMonitor pm)Evaluate the root of a function.
-
-
-
Method Detail
-
bisectionRootFinding
public static double bisectionRootFinding(ISingleArgmentFunction function, double bottomLimit, double upperLimit, double accuracy, double maxIterationNumber, IHMProgressMonitor pm)
Evaluate the root of a function.Use the bisection method. note that to use before to use this method it's necessary to have a special function object which is defined by the interface
Function.- Implements the bisection method an return the solution with a particular accuracy.
- return an error if the function doesn't converge to the solution in JMAX loop.
- Parameters:
function- is the function examined.bottomLimit- bottom left value of the x.upperLimit- upper right value of the x.accuracy- accuracy to use in the evaluation.maxIterationNumber- maximum number of iteration.- Returns:
- the solution of the equation.
- Throws:
ArithmeticException- if the method haven't achieve the solution in jMax steeps.
-
-