Package mikera.matrixx

Examples of mikera.matrixx.Matrix22


    return calculate(a);
  }
 
  private static AMatrix calculateSmall(AMatrix m, int rc) {
    if (rc==1) return new Matrix11(m).inverse();
    if (rc==2) return new Matrix22(m).inverse();
    if (rc==3) return new Matrix33(m).inverse();
    throw new IllegalArgumentException(ErrorMessages.incompatibleShape(m));
  }
View Full Code Here


   
    assertEquals(a.innerProduct(a),m.innerProduct(m));
  }
 
  @Test public void testSlice() {
    Matrix22 m1=new Matrix22(1,2,3,4);
    Matrix22 m2=new Matrix22(5,6,7,8);
    NDArray a=NDArray.wrap(Array.create(Arrayz.create(m1,m2)));
    assertEquals(m2,a.slice(0,1));
    assertEquals(new Matrix22(3,4,7,8),a.slice(1,1));
  }
View Full Code Here

    assertEquals(v,a.slice(0).slice(1));
  }
 
  @Test
  public void testPrimitiveMatricSlices() {
    Matrix22 m2=new Matrix22(1,2,3,4);
    AVector r0=m2.getRow(0);
    assertEquals(Vector2.class,r0.getClass());
  }
View Full Code Here

    return Transformz.createTranslation(copyOfTranslationVector());
  }
 
  @Override
  public Matrix22 copyOfMatrix() {
    return new Matrix22(m00,m01,m10,m11);
  }
View Full Code Here

TOP

Related Classes of mikera.matrixx.Matrix22

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.