Package mikera.matrixx.impl

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


  @Test
  public void testBasicDeterminant() {
    VectorMatrixMN mmn = new VectorMatrixMN(2, 2);
    mmn.getRow(0).set(Vector.of(2, 1));
    mmn.getRow(1).set(Vector.of(1, 2));
    assertEquals(3.0, mmn.determinant(), 0.0);
  }

  @Test
  public void testPermuteDeterminant() {
    VectorMatrixMN mmn = new VectorMatrixMN(3, 3);
View Full Code Here


  public void testPermuteDeterminant() {
    VectorMatrixMN mmn = new VectorMatrixMN(3, 3);
    mmn.set(0, 1, 1);
    mmn.set(1, 0, 1);
    mmn.set(2, 2, 1);
    assertEquals(-1.0, mmn.determinant(), 0.0);
  }

  @Test
  public void testEquivalentDeterminant() {
    Matrix33 m33 = new Matrix33();
View Full Code Here

    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 3; j++) {
        assertEquals(m33.get(i, j), mmn.get(i, j), 0.0);
      }

    assertEquals(m33.determinant(), mmn.determinant(), 0.00001);

  }

  @Test
  public void testCompoundTransform() {
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.