/** * Returns all matrix elements in a flat, row-major (column indices vary fastest) array. * The array length is 4. * * @return {@inheritDoc} */ @Override public final double[] getElements() { final double[] elements = new double[SIZE*SIZE]; getElements(elements); return elements; }
/** * Returns all matrix elements in a flat, row-major (column indices vary fastest) array. * The array length is 4. * * @return {@inheritDoc} */ @Override public final double[] getElements() { final double[] elements = new double[SIZE*SIZE]; getElements(elements); return elements; }
/** * Tests the {@link Matrix2#Matrix2(double, double, double, double)} constructor. * This constructor is specific to the implementation class. */ @Test public void testConstructor() { initialize(-8453835559080304420L); final double[] elements = createRandomPositiveValues(SIZE * SIZE); final Matrix2 matrix = new Matrix2( elements[0], elements[1], elements[2], elements[3]); validate(matrix); assertArrayEquals(elements, matrix.getElements(), STRICT); }