Class LaguerreSolver.ComplexSolver
- java.lang.Object
-
- org.apache.commons.math3.analysis.solvers.LaguerreSolver.ComplexSolver
-
- Enclosing class:
- LaguerreSolver
private class LaguerreSolver.ComplexSolver extends java.lang.ObjectClass for searching all (complex) roots.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateComplexSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRoot(double min, double max, Complex z)Check whether the given complex root is actually a real zero in the given interval, within the solver tolerance level.Complexsolve(Complex[] coefficients, Complex initial)Find a complex root for the polynomial with the given coefficients, starting from the given initial value.Complex[]solveAll(Complex[] coefficients, Complex initial)Find all complex roots for the polynomial with the given coefficients, starting from the given initial value.
-
-
-
Method Detail
-
isRoot
public boolean isRoot(double min, double max, Complex z)Check whether the given complex root is actually a real zero in the given interval, within the solver tolerance level.- Parameters:
min- Lower bound for the interval.max- Upper bound for the interval.z- Complex root.- Returns:
trueif z is a real zero.
-
solveAll
public Complex[] solveAll(Complex[] coefficients, Complex initial) throws NullArgumentException, NoDataException, TooManyEvaluationsException
Find all complex roots for the polynomial with the given coefficients, starting from the given initial value.- Parameters:
coefficients- Polynomial coefficients.initial- Start value.- Returns:
- the point at which the function value is zero.
- Throws:
TooManyEvaluationsException- if the maximum number of evaluations is exceeded.NullArgumentException- if thecoefficientsisnull.NoDataException- if thecoefficientsarray is empty.
-
solve
public Complex solve(Complex[] coefficients, Complex initial) throws NullArgumentException, NoDataException, TooManyEvaluationsException
Find a complex root for the polynomial with the given coefficients, starting from the given initial value.- Parameters:
coefficients- Polynomial coefficients.initial- Start value.- Returns:
- the point at which the function value is zero.
- Throws:
TooManyEvaluationsException- if the maximum number of evaluations is exceeded.NullArgumentException- if thecoefficientsisnull.NoDataException- if thecoefficientsarray is empty.
-
-