Package mikera.matrixx.impl

Examples of mikera.matrixx.impl.SparseColumnMatrix.validate()


    M1.replaceColumn(1, v1);

        int[] index = {0,2};
        double[] data = {7,8};
    SparseColumnMatrix M2 = SparseColumnMatrix.create(Vector.of(0,1,2),SparseIndexedVector.wrap(3, index, data),null);
        M2.validate();
   
    M1.add(M2);         // test adding SparseColumnMatrix
    assertEquals(2, M1.get(1,1), 0.01);
  }
View Full Code Here


  @Test public void testValidate() {
        try {
        AVector[] vecs = { Vectorz.createZeroVector(6), Vector.of(1,2,3), Vectorz.createZeroVector(6) };
        SparseColumnMatrix M = SparseColumnMatrix.create(vecs);
        M.validate();
            fail("Expected a VectorzException to be thrown");
        } catch (VectorzException E) {
            // assertThat(E.getMessage(), is("Invalid column count at row: 1"));
            // assertThat(E.getMessage(), is("Wrong length data line vector, length 3 at position: 1"));
        }
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.