code: function (x1, x2) {
  		var D = x1.length;
  		var d = 0;
  		for (var i = 0; i < D; i++) {
  			var x1i = x1[i];
  			var x2i = x2[i];
  			d += (x1i - x2i) * (x1i - x2i);
  		}
  		return d;
  	}
docs: compute L2 distance between two vectors