@Override public Matrix transform(int i, int j, MatrixFunction function, Factory factory) { Matrix result = copy(factory); result.set(i, j, function.evaluate(i, j, result.get(i, j))); return result; }
@Override public void update(MatrixFunction function) { for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { set(i, j, function.evaluate(i, j, get(i, j))); } } }
@Override public Matrix transform(MatrixFunction function, Factory factory) { Matrix result = blank(factory); for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { result.set(i, j, function.evaluate(i, j, get(i, j))); } } return result; }
@Override public void update(int i, int j, MatrixFunction function) { set(i, j, function.evaluate(i, j, get(i, j))); }