Examples of determinant()


Examples of ca.eandb.jmist.math.AffineMatrix3.determinant()

  }

  private void initialize() {
    if (!ready) {
      AffineMatrix3 matrix = t.apply(AffineMatrix3.IDENTITY);
      scaleFactor = Math.cbrt(matrix.determinant());

      Vector3 u = t.apply(Vector3.I).unit();
      Vector3 v = t.apply(Vector3.J).unit();
      Vector3 w = t.apply(Vector3.K).unit();
View Full Code Here

Examples of jinngine.math.Matrix3.determinant()

    public void testDeterminan() {
        Matrix3 m = new Matrix3(
                1., 4., -7.,
                2., -5., 8.,
                3., 6., 9.);
        assertEquals(-258., m.determinant());
        assertMatrixEquals(new double[]{
                    1., 4., -7.,
                    2., -5., 8.,
                    3., 6., 9.}, m);
        assertEquals(1., Matrix3.identity().determinant());
View Full Code Here

Examples of mikera.matrixx.Matrix.determinant()

            if( Math.abs(c.y - 0) < 1e-8 ) {
                // test using the characteristic equation
                Matrix temp = Matrix.createIdentity(A.columnCount());
                temp.scale(c.x);
                temp.sub(a);
                double det = temp.determinant();

                // extremely crude test.  given perfect data this is probably considered a failure...  However,
                // its hard to tell what a good test value actually is.
                assertEquals(0, det, 0.1);
            }
View Full Code Here

Examples of mikera.matrixx.Matrix.determinant()

  {
      int width = 10;

      Matrix A = Matrix.createRandom(width,width);

      double minorVal = A.determinant();

      AltLU alg = new AltLU();
      LUPResult result = alg._decompose(A);
      double luVal = result.computeDeterminant();
View Full Code Here

Examples of mikera.matrixx.Matrix.determinant()

  @SuppressWarnings("unused")
  @Test
  public void testDeterminant() {
    Matrix m=Matrixx.createRandomSquareMatrix(8);
    double d=m.determinant();
  }
 
  @Test
  public void testDetEquivalence3() {
    Matrix m=Matrixx.createRandomSquareMatrix(3);
View Full Code Here

Examples of mikera.matrixx.Matrix33.determinant()

    Matrix33 m=new Matrix33(1,2,3,4,5,6,7,8,9);
    double res=0;
   
    for (int i=0; i<runs; i++) {
      m.m00+=0.0000001;
      res+=m.determinant();
    }
    r.set(0,res);
  }
 
 
View Full Code Here

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

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

  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

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

    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.