/** * Retrieves the value at the specified row and column of this matrix. * This method can be invoked when the matrix size or type is unknown. * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be read directly for efficiency. * * @param row the row index, which can only be 0. * @param column the column index, which can only be 0. * @return the current value. */ @Override public final double getElement(final int row, final int column) { if (row == 0 && column == 0) { return m00; } else { throw indexOutOfBounds(row, column); } }
/** * Modifies the value at the specified row and column of this matrix. * This method can be invoked when the matrix size or type is unknown. * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be set directly for efficiency. * * @param row the row index, which can only be 0. * @param column the column index, which can only be 0. * @param value the new value to set. */ @Override public final void setElement(final int row, final int column, final double value) { if (row == 0 && column == 0) { m00 = value; } else { throw indexOutOfBounds(row, column); } }
/** * Retrieves the value at the specified row and column of this matrix. * This method can be invoked when the matrix size or type is unknown. * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be read directly for efficiency. * * @param row the row index, which can only be 0. * @param column the column index, which can only be 0. * @return the current value. */ @Override public final double getElement(final int row, final int column) { if (row == 0 && column == 0) { return m00; } else { throw indexOutOfBounds(row, column); } }
/** * Modifies the value at the specified row and column of this matrix. * This method can be invoked when the matrix size or type is unknown. * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be set directly for efficiency. * * @param row the row index, which can only be 0. * @param column the column index, which can only be 0. * @param value the new value to set. */ @Override public final void setElement(final int row, final int column, final double value) { if (row == 0 && column == 0) { m00 = value; } else { throw indexOutOfBounds(row, column); } }