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