Here you can find the source of distanceSV(double[] sv1, double[] sv2)
static public double distanceSV(double[] sv1, double[] sv2)
//package com.java2s; //License from project: Open Source License public class Main { static public double distanceSV(double[] sv1, double[] sv2) { double distance = 0.0d; for (int i = 0; i < sv1.length; i++) { distance += Math.pow(sv1[i] - sv2[i], 2); }//from w ww . j av a 2 s. c om distance = Math.sqrt(distance); return distance; } }