Package mikera.matrixx

Examples of mikera.matrixx.AMatrix.rowCount()


    mb.append(new double[] {0,1,0});
    mb.append(Vector.of(0,0).join(Vector.of(1)));
   
    AMatrix m= mb.toMatrix();
   
    assertEquals(3,m.rowCount());
    assertTrue(m.isIdentity());
  }
}
View Full Code Here


  @Test public void testBigIdentity() {
    AMatrix m=IdentityMatrix.create(2000000);
    m=m.sparse();
   
    assertEquals(m,m.innerProduct(m));
    assertEquals(m.rowCount(),m.nonZeroCount());
  }
 
 
  @Test public void testSparseSet() {
    SparseRowMatrix m=SparseRowMatrix.create(300, 300);
View Full Code Here

    AMatrix q=result.getQ();
    AMatrix r=result.getR();
   
    assertTrue(q.isOrthogonal(1e-8));
    assertTrue(r.isUpperTriangular());
    assertTrue(r.rowCount() == a.rowCount() && r.columnCount() == a.columnCount());
   
    assertTrue("product not valid",q.innerProduct(r).epsilonEquals(a));
  }

}
View Full Code Here

    private boolean extractTogether() {
        // extract the orthogonal from the similar transform
//        V = decomp.getQ(V,true);
        AMatrix temp = decomp.getQ(true);
        V = Matrix.wrap(temp.rowCount(), temp.columnCount(), temp.asDoubleArray());

        // tell eigenvector algorithm to update this matrix as it computes the rotators
        helper.setQ(V);

        vector.setFastEigenvalues(false);
View Full Code Here

        offSaved = helper.swapOff(offSaved);

        // extract the orthogonal from the similar transform
//        V = decomp.getQ(V,true);
        AMatrix temp = decomp.getQ(true);
        V = Matrix.wrap(temp.rowCount(), temp.columnCount(), temp.asDoubleArray());

        // tell eigenvector algorithm to update this matrix as it computes the rotators
        vector.setQ(V);

        // extract eigenvectors
View Full Code Here

            "Matrix must be square for inverse!"); }

        double []vv = decomp._getVV();
        AMatrix LU = decomp.getLU();
       
        Matrix A_inv = Matrix.create(LU.rowCount(), LU.columnCount());

        int n = A.columnCount();

        double dataInv[] = A_inv.data;
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.