Class LaguerreSolver.ComplexSolver
- java.lang.Object
-
- org.apache.commons.math3.analysis.solvers.LaguerreSolver.ComplexSolver
-
- Enclosing class:
- LaguerreSolver
private class LaguerreSolver.ComplexSolver extends java.lang.Object
Class for searching all (complex) roots.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ComplexSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Complex
solve(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:
true
if 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 thecoefficients
isnull
.NoDataException
- if thecoefficients
array 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 thecoefficients
isnull
.NoDataException
- if thecoefficients
array is empty.
-
-