DefaultDenseStringMatrix2D extends AbstractDenseStringMatrix2D implements
		HasStringArray { public final Matrix transpose() { final String[] result = new String[cols * rows]; for (int c = rows; --c != -1;) { for (int r = cols; --r != -1;) { result[c * cols + r] = values[r * rows + c]; } } return new DefaultDenseStringMatrix2D(result, cols, rows); } DefaultDenseStringMatrix2D(Matrix m);  DefaultDenseStringMatrix2D(int rows, int columns);  DefaultDenseStringMatrix2D(String[] v, int rows, int cols); String getString(long row, long column); void setString(String value, long row, long column); String getString(int row, int column); void setString(String value, int row, int column); final Matrix copy(); final Matrix transpose(); String[] getStringArray();  }
@Test public void testStringTranspose() { Matrix m1 = new DefaultDenseStringMatrix2D(2, 1); m1.setAsString("string1", 0, 0); m1.setAsString("string2", 1, 0); Matrix m2 = m1.transpose(); assertEquals("string1", m2.getAsString(0, 0)); assertEquals("string2", m2.getAsString(0, 1)); }