Package flanagan.complex

Examples of flanagan.complex.ComplexPoly


                return ss;
        }

        // Convert to a ComplexPoly
        public ComplexPoly toComplexPoly(){
            ComplexPoly cp = new ComplexPoly(this);
            return cp;
        }
View Full Code Here


        // Static method
        public static ArrayList<ComplexPoly> sTransform(double[] coeff){
            int n = coeff.length;
            ComplexPoly[] sNum = new ComplexPoly[n];                    // numerator of each transformed term
            ComplexPoly[] sDen = new ComplexPoly[n];                    // denomenator of each transformed term
            ComplexPoly sNumer = null;                                  // numerator of the completely transformed polynomial
            ComplexPoly sDenom = new ComplexPoly(Complex.plusOne());    // denomenator of the completely transformed polynomial

            // s-Transform of each term of the polynomial
            for(int i=0; i<n; i++){
                sNum[i] = new ComplexPoly(new Complex(coeff[i]*Fmath.factorial(i), 0));
                sDen[i] = new ComplexPoly(i+1);
                sDen[i].resetCoeff(i+1, Complex.plusOne());
            }

            // create a common denomenator
            sDenom = sDen[n-1];
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();
        }
View Full Code Here

        }

        // Calculate the roots - as above with the exception that the error messages are suppressed
        // Required by BlackBox
        public Complex[] rootsNoMessages(){
            ComplexPoly cp = new ComplexPoly(this);
            return cp.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);
        }
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));
        }
View Full Code Here

                                if(((String)temp.get(0)).equals("complex"))realRoots = false;
                                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

        public PlotPoleZero(Complex[] numer, Complex[] denom){

            if(numer!=null){
                this.nDeg = numer.length-1;
                if(this.nDeg>0){
                    this.numerPoly = new ComplexPoly(numer);;
                    this.numerRoots = Complex.oneDarray(nDeg);
                    this.mDeg = nDeg;
                    this.noZeros = false;
                }
            }

            if(denom!=null){
                this.dDeg = denom.length-1;
                if(this.dDeg>0){
                    this.denomPoly = new ComplexPoly(denom);;
                    this.denomRoots = Complex.oneDarray(dDeg);
                    if(!this.noZeros){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here

        public PlotPoleZero(double[] numer, double[] denom){

            if(numer!=null){
                this.nDeg = numer.length-1;
                if(this.nDeg>0){
                    this.numerPoly = new ComplexPoly(numer);;
                    this.numerRoots = Complex.oneDarray(nDeg);
                    this.mDeg = nDeg;
                    this.noZeros = false;
                }
            }

            if(denom!=null){
                this.dDeg = denom.length-1;
                if(this.dDeg>0){
                    this.denomPoly = new ComplexPoly(denom);;
                    this.denomRoots = Complex.oneDarray(dDeg);
                    if(!this.noZeros){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here

        // Enter zeros: array of Complex coefficients
        public void setNumerator(Complex[] numer){
            if(numer!=null){
                this.nDeg = numer.length-1;
                if(this.nDeg>0){
                    this.numerPoly = new ComplexPoly(numer);;
                    this.numerRoots = Complex.oneDarray(nDeg);
                    if(!this.noPoles){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here

TOP

Related Classes of flanagan.complex.ComplexPoly

Copyright © 2018 www.massapicom. 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.