code: public double[] Normalize(){
          double[] h = new double[values.length];
          for (int i = 0; i < h.length; i++) {
              h[i] = values[i] / (double)total;
          }
          return h;
      }
docs: Normalize histogram.
  @return Normalized histogram.