Package flanagan.complex

Examples of flanagan.complex.Complex


        super.addDeadTimeExtras();
    }

    public void setK(double kk){
        this.kConst = kk;
        Complex co = new Complex(this.aConst*this.kConst, 0.0);
        super.sNumer.resetCoeff(0, co);
        co = new Complex(this.kConst, 0.0);
        super.sNumer.resetCoeff(1, co);
        this.calcPolesZerosS();
        super.addDeadTimeExtras();
    }
View Full Code Here


        super.addDeadTimeExtras();
    }

    public void setA(double aa){
        this.aConst = aa;
        Complex co = new Complex(this.aConst*this.kConst, 0.0);
        super.sNumer.resetCoeff(0, co);
        this.calcPolesZerosS();
        super.addDeadTimeExtras();
    }
View Full Code Here

        super.addDeadTimeExtras();
    }

    public void setB(double bb){
        this.bConst = bb;
        Complex co = new Complex(this.bConst, 0.0);
        super.sDenom.resetCoeff(0, co);
        this.calcPolesZerosS();
        super.addDeadTimeExtras();
    }
View Full Code Here

        this.kp=kp;
        super.setSnumer(new ComplexPoly(this.kp));
        super.setSdenom(new ComplexPoly(1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
        super.sNumerScaleFactor = new Complex(kp, 0.0);
        super.sDenomScaleFactor = Complex.plusOne();
    }
View Full Code Here

    }

    // Set the proportional gain
    public void setKp(double kp){
        this.kp=kp;
        Complex num = new Complex(this.kp, 0.0D);
        super.sNumer.resetCoeff(0, num);
        super.addDeadTimeExtras();
        super.sNumerScaleFactor = new Complex(kp, 0.0);
    }
View Full Code Here

        // in a String format compatible with Complex.parse,
        // e.g 2+j3, 2 + j3, 2+i3, 2 + i3
        // No default option
        public static final synchronized Complex readComplex(String mess){
                String line="";
                Complex c = new Complex();
                boolean finish = false;
                String mess0 = "";
                if(Db.inputTypeInfo)mess0 = "Input type: Complex (x + jy)\n";

                System.out.flush();
View Full Code Here

  // the extinction coefficient (extCoeff)and the concentration of the absorbing species (concn)
  // and the wavelength (wavl).  For a pure material with a given absorption coefficient set concn
  // to unity and extCoeff to the value of the absorption coefficient.
  // The units of the concentration, the absorption coefficient and the wavelength should match.
  public static Complex absToComplex(double riReal, double extCoeff, double concn, double wavl){
      Complex ri = new Complex();
      ri.reset(riReal, extCoeff*concn*wavl/(4.0D*Math.PI));
      return ri;
  }
View Full Code Here

      // Reads a Complex from a dialog box with a prompt message and the return
        // of a default option if the return key alone is pressed - Complex default
        public static final synchronized Complex readComplex(String mess, Complex dflt){
                String line="";
                Complex c = new Complex();
                boolean finish = false;
                String mess0 = "";
                if(Db.inputTypeInfo)mess0 = "Input type: Complex (x + jy)\n";
                String dfltmess = dflt+"";
                mess = mess + "\n";
View Full Code Here

        double[]  derivRe = {0, -1.17631e+015, -3.60547e+015, 2.92961e+015, -4.45568e+015, 3.84052e+015, -9.56586e+014, -8.80015e+013, 1.17669e+015, -2.14766e+015, 2.49889e+015, -1.81842e+015, 1.06253e+015, -8.99034e+014, 1.01496e+015, -2.29767e+014, 7.62849e+014, -4.44179e+014, -5.30697e+014, 8.3214e+014, -1.17757e+015, 8.04127e+014, -1.40022e+015, 1.06549e+015, 7.02889e+013, -3.99e+014, 3.29142e+013, 2.65475e+014, -2.19619e+014, 1.38062e+014, -3.11414e+014, 1.90132e+014, -4.37649e+014, -4.12661e+014, 6.75965e+014, -4.75615e+013, 9.68919e+013, -1.02252e+013, 5.115e+013, -3.33214e+011, 5.09764e+012, -7.56272e+012, 1.02639e+013, -4.28914e+012, 3.57066e+012, -2.76676e+012, 1.04546e+012, 2.55831e+012, 0};
      // second derivatives - imaginary part
        double[]  derivIm = {0, 1.07557e+015, -4.54022e+014, 4.27299e+014, -5.01416e+014, 1.54402e+015, -9.99891e+014, 2.48281e+014, -4.98264e+014, 3.40549e+014, -2.67834e+014, 1.65108e+014, 2.31595e+014, 8.3984e+013, 1.49838e+014, -5.0561e+014, 3.84443e+013, -6.38396e+014, -1.55687e+014, 1.24515e+014, -2.15188e+014, 1.55368e+014, -3.38857e+014, 1.24305e+014, -1.79372e+013, 2.93519e+014, 4.26729e+013, -1.68238e+014, -1.7188e+013, -7.16957e+013, -4.22518e+013, -1.04677e+014, 2.39351e+013, 6.13432e+014, 8.33595e+013, -9.04645e+013, 2.22081e+013, -7.1846e+013, -1.13135e+013, -1.24725e+013, -3.07173e+012, 2.01135e+012, -1.58933e+013, 7.97278e+012, -1.02502e+012, -2.60397e+011, 3.57043e+011, 3.07012e+011, 0};
        int n = wavl.length;
        double  yRe, yIm;
        Complex  ri = new Complex();

      if(wavelength>=wavl[0] && wavelength<=wavl[n-1]){
        // cubic spline interpolation - real part
        yRe=CubicSpline.interpolate(wavelength, wavl, rfInRe, derivRe);
        // cubic spline interpolation - imaginary part
        yIm=CubicSpline.interpolate(wavelength, wavl, rfInIm, derivIm);
        ri.reset(yRe, RefractiveIndex.imagPlusMinus*yIm);
        }
      else{
        throw new IllegalArgumentException("Wavelength is outside the limits (187.86nm - 1937.2nm) of the tabulated data");
    }
      return ri;
View Full Code Here

        // Reads a Complex from a dialog box with a prompt message and the return
        // of a default option if the return key alone is pressed - String default
        public static final synchronized Complex readComplex(String mess, String dflt){
                String line="";
                Complex c = new Complex();
                boolean finish = false;
                String mess0 = "";
                if(Db.inputTypeInfo)mess0 = "Input type: Complex (x + jy)\n";
                String dfltmess = dflt;
                mess = mess + "\n";
View Full Code Here

TOP

Related Classes of flanagan.complex.Complex

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.