/** * {@inheritDoc} */ public double add(int row, int col, double delta) { double old = get(row, col); set(row, col, old+delta); return old; }
/** * {@inheritDoc} * * @throws IllegalArgumentException if the length of {@code values} is not * equal to the number of rows */ public void setColumn(int column, DoubleVector values) { if (values.length() != rows()) throw new IllegalArgumentException( "Number of values is not equal the number of rows"); for (int r = 0; r < values.length(); ++r) set(r, column, values.get(r)); }
/** * {@inheritDoc} * * @throws IllegalArgumentException if the length of {@code columns} is not * equal to the number of columns */ public void setRow(int row, DoubleVector values) { if (values.length() != columns()) throw new IllegalArgumentException( "Number of values is not equal the number of rows"); for (int c = 0; c < values.length(); ++c) set(row, c, values.get(c)); }
/** * {@inheritDoc} * * @throws IllegalArgumentException if the length of {@code values} is not * equal to the number of rows */ public void setColumn(int column, DoubleVector values) { if (values.length() != rows()) throw new IllegalArgumentException( "Number of values is not equal the number of rows"); for (int r = 0; r < values.length(); ++r) set(r, column, values.get(r)); }
/** * {@inheritDoc} * * @throws IllegalArgumentException if the length of {@code columns} is not * equal to the number of columns */ public void setRow(int row, DoubleVector values) { if (values.length() != columns()) throw new IllegalArgumentException( "Number of values is not equal the number of rows"); for (int c = 0; c < values.length(); ++c) set(row, c, values.get(c)); }