void () { Matrix matrix = Matrix.create(3, /*row:*/ 11, 21, /*row:*/ 12, 22, /*row:*/ 13, 23); int width = matrix.getColumns(); assertEquals(2, width); int height = matrix.getRows(); assertEquals(3, height); for (int w = 0; w < width; w++) { for (int h = 0; h < height; h++) { assertEquals((double)(10 * (w + 1) + (h + 1)), matrix.get(w, h)); } } assertEquals(Vector.create(11, 21), matrix.getRow(0)); assertEquals(Vector.create(12, 22), matrix.getRow(1)); assertEquals(Vector.create(13, 23), matrix.getRow(2)); assertEquals(Vector.create(11, 12, 13), matrix.getColumn(0)); assertEquals(Vector.create(21, 22, 23), matrix.getColumn(1)); }