Package JSci.maths.matrices

Examples of JSci.maths.matrices.ComplexSquareMatrix


        Complex              z = new Complex(Math.cos(h), Math.sin(h));
      

        // Create matrix kernel and compute element values
        final double         c = Math.sqrt(1.0/N);   // normalization constant
        ComplexSquareMatrix  Kf = new ComplexSquareMatrix( N );
        ComplexSquareMatrix  Ki = new ComplexSquareMatrix( N );
       
        for (int m=0; m<N; m++)    {
            for (int n=m; n<N; n++)    {
                double  cos = c*Math.cos(h*m*n);
                double  sin = c*Math.sin(h*m*n);
                Kf.setElement(m, n, cos, -sin);
                Kf.setElement(n, m, cos, -sin);
               
                Ki.setElement(m, n, cos, sin);
                Ki.setElement(n, m, cos, sin);
            }
        }
       
        this.szData = N;
        this.cpxZ   = z;
View Full Code Here


        Complex              zi = new Complex(Math.cos(h), Math.sin(h));
      

        // Create matrix kernel and compute element values
        final double         c = Math.sqrt(1.0/N);   // normalization constant
        ComplexSquareMatrix  Kf = new ComplexSquareMatrix( N );
        ComplexSquareMatrix  Ki = new ComplexSquareMatrix( N );
       
        Complex     kf, ki;     // matrix kernel element values
        Complex     zfm = Complex.ONE;
        Complex     zim = Complex.ONE;
        for (int m=0; m<N; m++)    {

            kf = zfm.multiply(c);
            ki = zim.multiply(c);
           
            for (int n=m; n<N; n++)    {
                Kf.setElement(m, n, kf);
                Kf.setElement(n, m, kf);
               
                Ki.setElement(m, n, ki);
                Ki.setElement(n, m, ki);

                kf = kf.multiply(zfm);
                ki = ki.multiply(zim);
            }
           
View Full Code Here

TOP

Related Classes of JSci.maths.matrices.ComplexSquareMatrix

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.