@Override public double calculateDistance(double[] x1,double[] x2){
  double norm2=norm2(x1,x2);
  double exp1=sigma1 == 0.0d ? 0.0d : Math.exp((-1) * norm2 / sigma1);
  double exp2=sigma2 == 0.0d ? 0.0d : Math.exp((-1) * norm2 / sigma2);
  double exp3=sigma3 == 0.0d ? 0.0d : Math.exp((-1) * norm2 / sigma3);
  return exp1 + exp2 - exp3;
}

@ Override public double calculateDistance ( double [ ] x1 , double [ ] x2 ) { double norm2 = norm2 ( x1 , x2 ) ; double exp1 = sigma1 == 0.0d ? 0.0d : Math . exp ( ( - 1 ) * norm2 / sigma1 ) ; double exp2 = sigma2 == 0.0d ? 0.0d : Math . exp ( ( - 1 ) * norm2 / sigma2 ) ; double exp3 = sigma3 == 0.0d ? 0.0d : Math . exp ( ( - 1 ) * norm2 / sigma3 ) ; return exp1 + exp2 - exp3 ; }
calculates kernel value of vectors x and y .
