if (Utils.sm(currVal, bestVal)) {
if ((first) || (Utils.sm(currVal, bestVal))) {
  public void buildClassifier(Instances instances) throws Exception {        double bestVal = Double.MAX_VALUE, currVal;    double bestPoint = -Double.MAX_VALUE, sum;    int bestAtt = -1, numClasses;    if (instances.checkForStringAttributes()) {      throw new Exception("Can't handle string attributes!");    }    double[][] bestDist = new double[3][instances.numClasses()];    theInstances = new Instances(instances);    theInstances.deleteWithMissingClass();    if (theInstances.classAttribute().isNominal()) {      numClasses = theInstances.numClasses();    } else {      numClasses = 1;    }    // For each attribute    for (int i = 0; i < theInstances.numAttributes(); i++) {      if (i != theInstances.classIndex()) {		// Reserve space for distribution.	m_Distribution = new double[3][numClasses];	// Compute value of criterion for best split on attribute	if (theInstances.attribute(i).isNominal()) {	  currVal = findSplitNominal(i);	} else {	  currVal = findSplitNumeric(i);	}	if (Utils.sm(currVal, bestVal)) {	  bestVal = currVal;	  bestAtt = i;	  bestPoint = m_SplitPoint;	  for (int j = 0; j < 3; j++) {	    System.arraycopy(m_Distribution[j], 0, bestDist[j], 0, 			     numClasses);	  }	}      }    }        // Set attribute, split point and distribution.    m_AttIndex = bestAtt;    m_SplitPoint = bestPoint;    m_Distribution = bestDist;    if (theInstances.classAttribute().isNominal()) {      for (int i = 0; i < m_Distribution.length; i++) {	Utils.normalize(m_Distribution[i]);      }    }        // Save memory    theInstances = new Instances(theInstances, 0);  }