Here you can find the source of normalizeToInPlace(double[] in, double normsum)
public static final void normalizeToInPlace(double[] in, double normsum)
//package com.java2s; //License from project: Apache License public class Main { public static final void normalizeToInPlace(double[] in, double normsum) { double sum = 0; for (int i = 0; i < in.length; i++) { sum += in[i];/*from www .j ava 2 s . c o m*/ } for (int i = 0; i < in.length; i++) { in[i] = normsum * in[i] / sum; } } }