Examples of columnCount()


Examples of mikera.matrixx.Matrix.columnCount()

        assertTrue( !U.hasUncountable() );
        assertTrue( !Vt.hasUncountable() );
        assertTrue( !W.hasUncountable() );

        if( svd.isCompact() ) {
          assertTrue(W.columnCount()==W.rowCount());
          assertTrue(U.columnCount()==W.rowCount());
            assertTrue(Vt.rowCount()==W.columnCount());
        } else {
          assertTrue(U.columnCount()==W.rowCount());
          assertTrue(W.columnCount()==Vt.rowCount());
View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

        assertTrue( !W.hasUncountable() );

        if( svd.isCompact() ) {
          assertTrue(W.columnCount()==W.rowCount());
          assertTrue(U.columnCount()==W.rowCount());
            assertTrue(Vt.rowCount()==W.columnCount());
        } else {
          assertTrue(U.columnCount()==W.rowCount());
          assertTrue(W.columnCount()==Vt.rowCount());
          assertTrue(U.columnCount()==U.rowCount());
            assertTrue(Vt.columnCount()==Vt.rowCount());
View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

          assertTrue(W.columnCount()==W.rowCount());
          assertTrue(U.columnCount()==W.rowCount());
            assertTrue(Vt.rowCount()==W.columnCount());
        } else {
          assertTrue(U.columnCount()==W.rowCount());
          assertTrue(W.columnCount()==Vt.rowCount());
          assertTrue(U.columnCount()==U.rowCount());
            assertTrue(Vt.columnCount()==Vt.rowCount());
        }

        Matrix found = Multiplications.multiply(U, Multiplications.multiply(W, Vt));
View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

        Matrix Q = result.getQ().toMatrix();
        Matrix R = result.getR().toMatrix();
        assertTrue(Q.rowCount() == height && Q.columnCount() == height);
        assertTrue(R.rowCount() == (compact ? minStride : height));
        assertTrue(R.columnCount() == width);

        // see if Q has the expected properties
        assertTrue(Q.isOrthogonal(1e-8));

        // see if it has the expected properties
View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

            // save the results
            double[]data = X.asDoubleArray();
            for( int i = 0; i < numCols; i++ ) {
//                X.data[i*X.columnCount()+colB] = a.data[i];
                data[i*X.columnCount()+colB] = a.data[i];
            }
        }
        return X;
    }
   
View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

     * @param B A matrix that is n by m.  Not modified.
     * @param X An n by m matrix where the solution is writen to.  Modified.
     */
    public AMatrix solve(AMatrix B) {
      Matrix X = Matrix.create(B.rowCount(), B.columnCount());
        if( B.columnCount() != X.columnCount() && B.rowCount() != n && X.rowCount() != n) {
            throw new IllegalArgumentException("Unexpected matrix size");
        }

        int numCols = B.columnCount();

View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

     *
     * @return inverse of matrix that was decomposed
     */
    public AMatrix invert() {
      Matrix inv = Matrix.create(numRows, numCols);
        if( inv.rowCount() != n || inv.columnCount() != n ) {
            throw new RuntimeException("Unexpected matrix dimension");
        }

        double a[] = inv.data;

View Full Code Here

Examples of mikera.matrixx.Matrix.columnCount()

     * @param B A matrix that is n by m.  Not modified.
     * @param X An n by m matrix where the solution is written to.  Modified.
     */
    public AMatrix solve(AMatrix B) {
      Matrix X = Matrix.create(B.rowCount(), B.columnCount());
        if( B.columnCount() != X.columnCount() && B.rowCount() != n && X.rowCount() != n) {
            throw new IllegalArgumentException("Unexpected matrix size");
        }

        int numCols = B.columnCount();

View Full Code Here

Examples of mikera.matrixx.impl.AStridedMatrix.columnCount()

      AStridedMatrix tsm = m.subMatrix(1, 1, 1, 1);
    }

    AStridedMatrix sm = m.subMatrix(1, 2, 1, 2);
    assertEquals(2, sm.rowCount());
    assertEquals(2, sm.columnCount());
    assertTrue(sm.data == m.data);

    assertEquals(
        Matrixx.create(new double[][] { { 5.0, 6.0 }, { 9.0, 10.0 } }),
        sm);
View Full Code Here

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

public class TestVectorMatrix {

  @Test public void testCreateM3() {
    VectorMatrixM3 m=new VectorMatrixM3(0);
    assertEquals(0,m.rowCount());
    assertEquals(3,m.columnCount());
   
    AMatrix mt=m.getTranspose();
    assertEquals(0,mt.columnCount());
  }
 
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.