@Override public double calculateDistance(double[] x1,double[] x2){
  double prod=a * innerProduct(x1,x2) + b;
  double e1=Math.exp(prod);
  double e2=Math.exp(-prod);
  return ((e1 - e2) / (e1 + e2));
}

@ Override public double calculateDistance ( double [ ] x1 , double [ ] x2 ) { double prod = a * innerProduct ( x1 , x2 ) + b ; double e1 = Math . exp ( prod ) ; double e2 = Math . exp ( - prod ) ; return ( ( e1 - e2 ) / ( e1 + e2 ) ) ; }
subclasses must implement this method .
