code: @Override
  	public boolean checkScaling(final DoubleMatrix2D A, 
  			final DoubleMatrix1D U, final DoubleMatrix1D V){
  		
  		final double log10_2 = Math.log10(base);
  		final double[] originalOFValue = {0};
  		final double[] scaledOFValue = {0};
  		final double[] x = new double[A.rows()];
  		final double[] y = new double[A.columns()];
  		
  		A.forEachNonZero(new IntIntDoubleFunction() {
  			@Override
  			public double apply(int i, int j, double aij) {
  				double v = Math.log10(Math.abs(aij)) / log10_2 + 0.5;
  				originalOFValue[0] = originalOFValue[0] + Math.pow(v, 2);
  				double xi = Math.log10(U.getQuick(i)) / log10_2;
  				double yj = Math.log10(V.getQuick(j)) / log10_2;
  				scaledOFValue[0] = scaledOFValue[0] + Math.pow(xi + yj + v, 2);
  				x[i] = xi;
  				y[j] = yj;
  				return aij;
  			}
  		});
  		
  		originalOFValue[0] = 0.5 * originalOFValue[0];
  		scaledOFValue[0]   = 0.5 * scaledOFValue[0];
  		
  		logger.debug("x: " + ArrayUtils.toString(x));
  		logger.debug("y: " + ArrayUtils.toString(y));
  		logger.debug("originalOFValue: " + originalOFValue[0]);
  		logger.debug("scaledOFValue  : " + scaledOFValue[0]);
  		return !(originalOFValue[0] < scaledOFValue[0]);
  	}
docs: Check if the scaling algorithm returned proper results.
  Note that the scaling algorithm is for minimizing a given objective function of the original matrix elements, and
  the check will be done on the value of this objective function.
  @param A the ORIGINAL (before scaling) matrix
  @param U the return of the scaling algorithm
  @param V the return of the scaling algorithm
  @param base
  @return