public double eval(int id1,int id2,Instance inst1) throws Exception {
  double div=Math.sqrt(super.eval(id1,id1,inst1) * ((m_keys != null) ? super.eval(id2,id2,m_data.instance(id2)) : super.eval(-1,-1,m_data.instance(id2))));
  if (div != 0) {
    return super.eval(id1,id2,inst1) / div;
  }
 else {
    return 0;
  }
}

public double eval ( int id1 , int id2 , Instance inst1 ) throws Exception { double div = Math . sqrt ( super . eval ( id1 , id1 , inst1 ) * ( ( m_keys != null ) ? super . eval ( id2 , id2 , m_data . instance ( id2 ) ) : super . eval ( - 1 , - 1 , m_data . instance ( id2 ) ) ) ) ; if ( div != 0 ) { return super . eval ( id1 , id2 , inst1 ) / div ; } else { return 0 ; } }
computes the result of the kernel function for two instances . if id1 = = - 1 , eval use inst1 instead of an instance in the dataset . redefines the eval function of polykernel .
