Class RootFinderCompanion

java.lang.Object
org.ddogleg.solver.impl.RootFinderCompanion
All Implemented Interfaces:
PolynomialRoots

public class RootFinderCompanion extends Object implements 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 Details

    • RootFinderCompanion

      public RootFinderCompanion()
  • Method Details

    • process

      public boolean process(Polynomial poly)
      Description copied from interface: PolynomialRoots

      Finds the roots of the provided polynomial.

      Specified by:
      process in interface PolynomialRoots
      Parameters:
      poly - Polynomial being considered. Not modified.
      Returns:
      true if successful.
    • getRoots

      public List<Complex_F64> getRoots()
      Description copied from interface: PolynomialRoots
      Returns all the found roots of the polynomial.
      Specified by:
      getRoots in interface PolynomialRoots
      Returns:
      roots