Examples of multMat()


Examples of org.jamesii.core.math.Matrix.multMat()

  public void testMultMat() {
    double[][] data = new double[][] { { 1, 2, 3 }, { 4, 5, 6 } };
    double[][] result = new double[][] { { 1.5, 3, 4.5 }, { 6, 7.5, 9 } };

    Matrix m = new Matrix(data);
    m.multMat(1.5);

    for (int c = 0; c < m.getColumns(); c++) {
      for (int r = 0; r < m.getRows(); r++) {
        assertEquals(result[r][c], m.getElement(r, c));
      }
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.