Examples of subMatrix()


Examples of mikera.matrixx.AMatrix.subMatrix()

  @Test public void g_MatrixViews4x5() { 
    AMatrix m3=Matrixx.createRandomMatrix(4,5);
    doGenericTests(m3.asVector());
    doGenericTests(m3.getRow(2));
    doGenericTests(m3.getColumn(2));
    doGenericTests(m3.subMatrix(1, 1, 2, 3).asVector());
    doGenericTests(new MatrixAsVector(m3));
  }
   
  @Test public void g_AxisVector() { 
    doGenericTests(AxisVector.create(1,3));
View Full Code Here

Examples of mikera.matrixx.Matrix.subMatrix()

        qr.householder(w,A);

//        SimpleMatrix U = new SimpleMatrix(width,1, true, qr.getQR()[w]).extractMatrix(w,width,0,1);
        Matrix temp = Matrix.create(width,1);
        temp.setElements(qr.getQR()[w]);
        AStridedMatrix U = temp.subMatrix(w, width-w, 0, 1);
       
        U.set(0,0,1); // this is not explicity set and is assumed to be 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());
View Full Code Here

Examples of mikera.matrixx.Matrix.subMatrix()

        qr.householder(w,A);

//        SimpleMatrix U = new SimpleMatrix(width,1, true, qr.getU()).extractMatrix(w,width,0,1);
        Matrix temp = Matrix.create(width,1);
        temp.setElements(qr.getU());
        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());
View Full Code Here

Examples of mikera.matrixx.impl.PermutedMatrix.subMatrix()

    // permuted matrix
    PermutedMatrix pmm=new PermutedMatrix(mmn,
        Indexz.createRandomPermutation(mmn.rowCount()),
        Indexz.createRandomPermutation(mmn.columnCount()));
    doGenericTests(pmm);
    doGenericTests(pmm.subMatrix(1, 4, 1, 5));
   
 
 
  @Test public void g_VectorMatrix() {
    // specialised Mx3 matrix
View Full Code Here

Examples of mikera.matrixx.impl.VectorMatrixM3.subMatrix()

  @Test public void g_VectorMatrix() {
    // specialised Mx3 matrix
    VectorMatrixM3 mm3=new VectorMatrixM3(10);
    Arrayz.fillNormal(mm3,101);
    doGenericTests(mm3);
    doGenericTests(mm3.subMatrix(1, 1, 1, 1));
 
    // general M*N matrix
    VectorMatrixMN mmn=new VectorMatrixMN(6 ,7);
    randomise(mmn);
    doGenericTests(mmn);
View Full Code Here

Examples of mikera.matrixx.impl.VectorMatrixMN.subMatrix()

 
    // general M*N matrix
    VectorMatrixMN mmn=new VectorMatrixMN(6 ,7);
    randomise(mmn);
    doGenericTests(mmn);
    doGenericTests(mmn.subMatrix(1, 4, 1, 5));
 
    // small 2*2 matrix
    mmn=new VectorMatrixMN(2,2);
    doGenericTests(mmn);
   
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.