Package flanagan.complex

Examples of flanagan.complex.ComplexPoly.roots()


            return cp.roots(new Complex(estx, 0.0));
        }

        public Complex[] roots(Complex estx){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots(estx);
        }

        // Calculate the roots (real or complex) of a polynomial (real or complex)
        public Complex[] roots(boolean polish, double estx){
            ComplexPoly cp = new ComplexPoly(this);
View Full Code Here


        }

        // Calculate the roots (real or complex) of a polynomial (real or complex)
        public Complex[] roots(boolean polish, double estx){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots(new Complex(estx, 0.0));
        }

        // ROOTS OF A QUADRATIC EQUATION
        // ax^2 + bx + c = 0
        // roots returned in root[]
View Full Code Here

        // Calculate the roots (real or double) of a polynomial (real or double)
        // polish = true ([for deg>3 see laguerreAll(...)]
        // initial root estimates are all zero [for deg>3 see laguerreAll(...)]
        public Complex[] roots(){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots();
        }

        // Calculate the roots - as above with the exception that the error messages are suppressed
        // Required by BlackBox
        public Complex[] rootsNoMessages(){
View Full Code Here

        // Calculate the roots (real or double) of a polynomial (real or double)
        // initial root estimates are all zero [for deg>3 see laguerreAll(...)]
        // for polish  see laguerreAll(...)[for deg>3]
        public Complex[] roots(boolean polish){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots(polish);
        }

        // Calculate the roots (real or double) of a polynomial (real or double)
        // for estx  see laguerreAll(...)[for deg>3] - initial estimate of first root
        // polish = true  see laguerreAll(...)[for deg>3]
View Full Code Here

        // Calculate the roots (real or double) of a polynomial (real or double)
        // for estx  see laguerreAll(...)[for deg>3] - initial estimate of first root
        // polish = true  see laguerreAll(...)[for deg>3]
        public Complex[] roots(double estx){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots(new Complex(estx, 0.0));
        }

        public Complex[] roots(Complex estx){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.roots(estx);
View Full Code Here

                                break;
                        case 4: temp = RealRoot.cubic(coeffWz[0],coeffWz[1],coeffWz[2], coeffWz[3]);
                                if(((String)temp.get(0)).equals("complex"))realRoots = false;
                                break;
                        default: ComplexPoly cp = new ComplexPoly(coeffWz);
                                Complex[] croots = cp.roots(polish, new Complex(estx, 0.0));
                                cdreal = new double[nCoeffWz-1];
                                int counter = 0;
                                for(int i=0; i<(nCoeffWz-1); i++){
                                    if(croots[i].getImag()/croots[i].getReal()<RealRoot.realTol){
                                        cdreal[i] = croots[i].getReal();
View Full Code Here

                                break;
                        case 4: temp = RealRoot.cubic(coeffWz[0],coeffWz[1],coeffWz[2], coeffWz[3]);
                                if(((String)temp.get(0)).equals("complex"))realRoots = false;
                                break;
                        default: ComplexPoly cp = new ComplexPoly(coeffWz);
                                Complex[] croots = cp.roots(polish, new Complex(estx, 0.0));
                                cdreal = new double[nCoeffWz-1];
                                int counter = 0;
                                for(int i=0; i<(nCoeffWz-1); i++){
                                    if(croots[i].getImag()/croots[i].getReal()<RealRoot.realTol){
                                        cdreal[i] = croots[i].getReal();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.