code: public static double norm(double[] vect) {
  	double res = 0.0;
  	for (int i = 0; i < vect.length; i++) {
  	    res += vect[i] * vect[i];
  	}	
  	return Math.sqrt(res);
      }
docs: Norm.
  
  @param vect the vect
  @return the double