Package mikera.matrixx.impl

Examples of mikera.matrixx.impl.SubsetMatrix


    assertEquals(m.get(1, 2), 10, 0.0);
  }

  @Test
  public void testSubsetMatrix() {
    SubsetMatrix m = SubsetMatrix.create(Index.of(0, 1, 2), 3);

    assertEquals(1.0, m.get(0, 0), 0.0);
    assertEquals(Vector.of(1, 0, 0), m.getRow(0));
    assertEquals(Vector.of(0, 1, 0), m.getColumn(1));
    assertEquals(Vector.of(0, 1, 0),
        SparseIndexedVector.create(m.getColumn(1)));
  }
View Full Code Here


        SparseIndexedVector.create(m.getColumn(1)));
  }

  @Test
  public void testSubsetMatrix2() {
    SubsetMatrix m = SubsetMatrix.create(Index.of(1, 1), 2);

    assertEquals(Vector.of(0, 0), m.getColumn(0));
    assertEquals(Vector.of(1, 1), m.getColumn(1));
  }
View Full Code Here

TOP

Related Classes of mikera.matrixx.impl.SubsetMatrix

Copyright © 2018 www.massapicom. 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.