public void normalizeSquared(int col) {
        double sqr = 0.0f;
        for(int j=0; j < nrows; j++) {
            double x = (double) getValue(j, col);
            sqr += x * x;
        }
        System.out.println("Normalize-squared: " + col + " sqr: " + sqr);

        float div = (float) Math.sqrt(sqr);
        System.out.println("Div : " + div);

        if (Float.isInfinite(div) || Float.isNaN(div)) throw new RuntimeException("Illegal normalizer: " + div);

        if (sqr == 0.0f) throw new IllegalArgumentException("Column was all-zeros!");
        for(int j=0; j < nrows; j++) {
            float x = getValue(j, col);
            setValue(j, col, x / div);
        }
    }