### Question:
DenseMatrix implements Serializable { public DenseMatrix minus(DenseMatrix mat) { DenseMatrix r = this.clone(); BLAS.axpy(-1.0, mat, r); return r; } DenseMatrix();  DenseMatrix(int m, int n);  DenseMatrix(int m, int n, double[] data);  DenseMatrix(int m, int n, double[] data, boolean inRowMajor);  DenseMatrix(double[][] data); static DenseMatrix eye(int n); static DenseMatrix eye(int m, int n); static DenseMatrix zeros(int m, int n); static DenseMatrix ones(int m, int n); static DenseMatrix rand(int m, int n); static DenseMatrix randSymmetric(int n); double get(int i, int j); double[] getData(); double[][] getArrayCopy2D(); double[] getArrayCopy1D(boolean inRowMajor); double[] getRow(int row); double[] getColumn(int col); @Override DenseMatrix clone(); @Override boolean equals(Object o); DenseMatrix selectRows(int[] rows); DenseMatrix getSubMatrix(int m0, int m1, int n0, int n1); void setSubMatrix(DenseMatrix sub, int m0, int m1, int n0, int n1); void set(int i, int j, double s); void add(int i, int j, double s); boolean isSquare(); boolean isSymmetric(); int numRows(); int numCols(); double sum(); DenseMatrix scale(double v); void scaleEqual(double v); DenseMatrix plus(DenseMatrix mat); DenseMatrix plus(double alpha); void plusEquals(DenseMatrix mat); void plusEquals(double alpha); DenseMatrix minus(DenseMatrix mat); void minusEquals(DenseMatrix mat); DenseMatrix multiplies(DenseMatrix mat); DenseVector multiplies(DenseVector x); DenseVector multiplies(SparseVector x); DenseMatrix transpose(); @Override String toString(); double norm2(); double cond(); double det(); int rank(); DenseMatrix solve(DenseMatrix matB); DenseVector solve(DenseVector b); DenseMatrix solveLS(DenseMatrix matB); DenseVector solveLS(DenseVector b); DenseMatrix inverse();  }### Answer:
@Test public void testMinus() throws Exception { DenseMatrix matA = new DenseMatrix(new double[][]{ new double[]{1, 3, 5}, new double[]{2, 4, 6}, }); DenseMatrix matB = DenseMatrix.ones(2, 3); DenseMatrix matC = matA.minus(matB); Assert.assertArrayEquals(matC.getData(), new double[]{0, 1, 2, 3, 4, 5}, TOL); }