### Question:
OGMatrixAlgebra extends MatrixAlgebra { @Override public DoubleMatrix getTranspose(Matrix m) { ArgChecker.notNull(m, "m"); if (m instanceof DoubleMatrix) { DoubleMatrix matrix = (DoubleMatrix) m; return DoubleMatrix.of(matrix.columnCount(), matrix.rowCount(), (i, j) -> matrix.get(j, i)); } throw new IllegalArgumentException("Can only take transpose of DoubleMatrix; have " + m.getClass()); }  @Override double getCondition(Matrix m); @Override double getDeterminant(Matrix m); @Override double getInnerProduct(Matrix m1, Matrix m2); @Override DoubleMatrix getInverse(Matrix m); @Override double getNorm1(Matrix m); @Override double getNorm2(Matrix m); @Override double getNormInfinity(Matrix m); @Override DoubleMatrix getOuterProduct(Matrix m1, Matrix m2); @Override DoubleMatrix getPower(Matrix m, int p); @Override double getTrace(Matrix m); @Override DoubleMatrix getTranspose(Matrix m); @Override Matrix multiply(Matrix m1, Matrix m2); @Override DoubleMatrix getPower(Matrix m, double p);  }### Answer:
@Test public void testTranspose() { final DoubleMatrix a = DoubleMatrix.copyOf(new double[][] {{1, 2}, {3, 4}, {5, 6}}); assertThat(a.rowCount()).isEqualTo(3); assertThat(a.columnCount()).isEqualTo(2); DoubleMatrix aT = ALGEBRA.getTranspose(a); assertThat(aT.rowCount()).isEqualTo(2); assertThat(aT.columnCount()).isEqualTo(3); }