Class QuarticRoot

    • Constructor Detail

      • QuarticRoot

        public QuarticRoot​(QuarticRoot.QuarticSolver solver)
        Construct a quartic equation solver.
        Parameters:
        solver - the implementation of a QuarticSolver
      • QuarticRoot

        public QuarticRoot()
        Construct a quartic equation solver.
    • Method Detail

      • solve

        public List<Number> solve​(Polynomial polynomial)
        Solve \(ax^4 + bx^3 + cx^2 + dx + e = 0\).
        Specified by:
        solve in interface PolyRootSolver
        Parameters:
        polynomial - a quartic equation to be solved
        Returns:
        the roots of the quartic equation
        Throws:
        IllegalArgumentException - if the polynomial degree is not 4