Package org.ddogleg.solver.impl
Class RootFinderCompanion
java.lang.Object
org.ddogleg.solver.impl.RootFinderCompanion
- All Implemented Interfaces:
PolynomialRoots
Finds the roots of a polynomial using a companion matrix and eigenvalue decomposition. Note that the companion
matrix is not as stable as people think and will some times fail. To help improve the situations the found roots
are refined.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRoots()
Returns all the found roots of the polynomial.boolean
process
(Polynomial poly) Finds the roots of the provided polynomial.
-
Constructor Details
-
RootFinderCompanion
public RootFinderCompanion()
-
-
Method Details
-
process
Description copied from interface:PolynomialRoots
Finds the roots of the provided polynomial.
- Specified by:
process
in interfacePolynomialRoots
- Parameters:
poly
- Polynomial being considered. Not modified.- Returns:
- true if successful.
-
getRoots
Description copied from interface:PolynomialRoots
Returns all the found roots of the polynomial.- Specified by:
getRoots
in interfacePolynomialRoots
- Returns:
- roots
-