public static MatrixAccumulator asFunctionAccumulator(
final MatrixAccumulator accumulator,
final MatrixFunction function)
{
return new MatrixAccumulator() {
@Override
public void update(int i, int j, byte value) {
accumulator.update(i, j, function.evaluate(i, j, value));