Package mikera.matrixx

Examples of mikera.matrixx.Matrix.scale()


        u_sub.set(0,0,1);// assumed to be 1 in the algorithm
//        SimpleMatrix A_sub = A.extractMatrix(w,width,w,width);
        AStridedMatrix A_sub = A.subMatrix(w,width-w,w,width-w);
//        SimpleMatrix expected = I.minus(u_sub.mult(u_sub.transpose()).scale(gamma)).mult(A_sub);
        Matrix temp1 = Multiplications.multiply(u_sub, u_sub.getTranspose());
        temp1.scale(gamma);
        I.sub(temp1);
        Matrix expected = Multiplications.multiply(I, A_sub);

        qr.updateA(w,U.asDoubleArray(),gamma,tau);
View Full Code Here


        checkComponents(alg,A);

        // then the smaller one
        A = Matrix.createRandom(5,5);
        A.sub(0.5);
        A.scale(2);
       
        assertNotNull(alg._decompose(A));
        checkComponents(alg,A);
    }
View Full Code Here

            Vector2 c = alg.getEigenvalue(i);

            if( Math.abs(c.y - 0) < 1e-8 ) {
                // test using the characteristic equation
                Matrix temp = Matrix.createIdentity(A.columnCount());
                temp.scale(c.x);
                temp.sub(a);
                double det = temp.determinant();

                // extremely crude test.  given perfect data this is probably considered a failure...  However,
                // its hard to tell what a good test value actually is.
View Full Code Here

        AStridedMatrix U = temp.subMatrix(w, width-w, 0, 1);

        Matrix I = Matrix.createIdentity(width-w);
//      SimpleMatrix Q = I.minus(U.mult(U.transpose()).scale(qr.getGamma()));
        Matrix temp1 = Multiplications.multiply(U, U.getTranspose());
        temp1.scale(qr.getGamma());
        I.sub(temp1);
        Matrix Q = I;


        // check the expected properties of Q
View Full Code Here

        AStridedMatrix u_sub = U.subMatrix(w, width-w, 0, 1);
//        SimpleMatrix A_sub = A.extractMatrix(w,width,w,width);
        AStridedMatrix A_sub = A.subMatrix(w,width-w,w,width-w);
//        SimpleMatrix expected = I.minus(u_sub.mult(u_sub.transpose()).scale(gamma)).mult(A_sub);
        Matrix temp1 = Multiplications.multiply(u_sub, u_sub.getTranspose());
        temp1.scale(gamma);
        I.sub(temp1);
        Matrix expected = Multiplications.multiply(I, A_sub);

        qr.updateA(w,U.asDoubleArray(),gamma,tau);
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.