Class TartagliaSolver


  • public class TartagliaSolver
    extends java.lang.Object
    Objects of this class are real value solvers of the system: cx^3+ax+b=0.
    Author:
    JIBOYE OLuwagbemiro Olaoluwa
    • Constructor Summary

      Constructors 
      Constructor Description
      TartagliaSolver​(double c, double a, double b)  
    • Method Summary

      Modifier and Type Method Description
      double getA()  
      double getB()  
      double getC()  
      void normalizeCofficients()
      Make the value of c to be equal to one by dividing through a,b,c by its value
      void setA​(double a)  
      void setB​(double b)  
      void setC​(double c)  
      java.lang.String solve()
      Finds the real roots of the equation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TartagliaSolver

        public TartagliaSolver​(double c,
                               double a,
                               double b)
    • Method Detail

      • getA

        public double getA()
      • setA

        public void setA​(double a)
      • getB

        public double getB()
      • setB

        public void setB​(double b)
      • getC

        public double getC()
      • setC

        public void setC​(double c)
      • normalizeCofficients

        public void normalizeCofficients()
        Make the value of c to be equal to one by dividing through a,b,c by its value
      • solve

        public java.lang.String solve()
        Finds the real roots of the equation.