code: public static MatrixAccumulator mkEuclideanNormAccumulator() {
          return new MatrixAccumulator() {
              private BigDecimal result = BigDecimal.valueOf(0.0);
  
              @Override
              public void update(int i, int j, double value) {
                  result = result.add(BigDecimal.valueOf(value * value));
              }
  
              @Override
              public double accumulate() {
                  double value = result.setScale(Matrices.ROUND_FACTOR, RoundingMode.CEILING).doubleValue();
                  result = BigDecimal.valueOf(0.0);
                  return Math.sqrt(value);
              }
          };
      }
docs: Makes an Euclidean norm accumulator that allows to use
  {@link org.la4j.Matrix#fold(org.la4j.matrix.functor.MatrixAccumulator)}
  method for norm calculation.
  
  @return an Euclidean norm accumulator