Examples of applyInverse()


Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v2 = new Vector(dv.clone());

    Vector v3 = t.apply(v1);
    assertEquals("identity transformation wasn't identical", v2, v3);

    Vector v4 = t.applyInverse(v2);
    assertEquals("inverse of identity wasn't identity", v1, v4);
  }

  /**
   * Test adding translation vectors
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v1 = new Vector(dv1);
    Vector v2t = new Vector(dv2);

    Vector v1t = t.apply(v1);
    assertEquals("Vector wasn't translated properly forward.", v2t, v1t);
    Vector v2b = t.applyInverse(v2t);
    assertEquals("Vector wasn't translated properly backwards.", v1, v2b);
    Vector v1b = t.applyInverse(v1t);
    assertEquals("Vector wasn't translated properly back and forward.", v1, v1b);

    // Translation
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v1t = t.apply(v1);
    assertEquals("Vector wasn't translated properly forward.", v2t, v1t);
    Vector v2b = t.applyInverse(v2t);
    assertEquals("Vector wasn't translated properly backwards.", v1, v2b);
    Vector v1b = t.applyInverse(v1t);
    assertEquals("Vector wasn't translated properly back and forward.", v1, v1b);

    // Translation
    Vector vd = v1.minus(v2b);
    Vector vtd = v1t.minus(v2t);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    for(int i = 0; i < testdim; i++) {
      dv[i] = i * i + testdim;
    }
    Vector v1 = new Vector(dv);
    Vector v2 = t.apply(v1);
    Vector v3 = t.applyInverse(v2);
    assertTrue("Forward-Backward didn't work correctly.", v1.minus(v3).euclideanLength() < 0.0001);
    Vector v4 = t.apply(t.apply(t.apply(v1)));
    assertTrue("Triple-Rotation by 120 degree didn't work", v1.minus(v4).euclideanLength() < 0.0001);

    // Rotation shouldn't disagree for relative vectors.
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v2 = new Vector(dv.clone());

    Vector v3 = t.apply(v1);
    assertEquals("identity transformation wasn't identical", v2, v3);

    Vector v4 = t.applyInverse(v2);
    assertEquals("inverse of identity wasn't identity", v1, v4);
  }

  /**
   * Test adding translation vectors
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v1 = new Vector(dv1);
    Vector v2t = new Vector(dv2);

    Vector v1t = t.apply(v1);
    assertEquals("Vector wasn't translated properly forward.", v2t, v1t);
    Vector v2b = t.applyInverse(v2t);
    assertEquals("Vector wasn't translated properly backwards.", v1, v2b);
    Vector v1b = t.applyInverse(v1t);
    assertEquals("Vector wasn't translated properly back and forward.", v1, v1b);

    // Translation
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    Vector v1t = t.apply(v1);
    assertEquals("Vector wasn't translated properly forward.", v2t, v1t);
    Vector v2b = t.applyInverse(v2t);
    assertEquals("Vector wasn't translated properly backwards.", v1, v2b);
    Vector v1b = t.applyInverse(v1t);
    assertEquals("Vector wasn't translated properly back and forward.", v1, v1b);

    // Translation
    Vector vd = v1.minus(v2b);
    Vector vtd = v1t.minus(v2t);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.applyInverse()

    for(int i = 0; i < testdim; i++) {
      dv[i] = i * i + testdim;
    }
    Vector v1 = new Vector(dv);
    Vector v2 = t.apply(v1);
    Vector v3 = t.applyInverse(v2);
    assertTrue("Forward-Backward didn't work correctly.", v1.minus(v3).euclideanLength() < 0.0001);
    Vector v4 = t.apply(t.apply(t.apply(v1)));
    assertTrue("Triple-Rotation by 120 degree didn't work", v1.minus(v4).euclideanLength() < 0.0001);

    // Rotation shouldn't disagree for relative vectors.
View Full Code Here

Examples of net.imglib2.transform.integer.SequentializeTransform.applyInverse()

    for ( int d = 0; d < 4; ++d )
    {
      expectedSource[ d ] = source[ d ];
      source[ d ] = -1;
    }
    t.applyInverse( source, target );
    assertArrayEquals( expectedSource, source );

    source[ 0 ] = 0;
    source[ 1 ] = 0;
    source[ 2 ] = 0;
View Full Code Here

Examples of net.imglib2.transform.integer.SequentializeTransform.applyInverse()

    for ( int d = 0; d < 4; ++d )
    {
      expectedSource[ d ] = source[ d ];
      source[ d ] = -1;
    }
    t.applyInverse( source, target );
    assertArrayEquals( expectedSource, source );

    source[ 0 ] = 9;
    source[ 1 ] = 4;
    source[ 2 ] = 2;
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.