if (!Instances.inRanges(second,m_Ranges)) OOPS("Not in ranges");
  public double distance(Instance first, Instance second) throws Exception {    if (!Instances.inRanges(first,m_Ranges))	OOPS("Not in ranges");    //OOPS(" dist first  "+ first);    if (!Instances.inRanges(second,m_Ranges))	OOPS("Not in ranges");    //OOPS(" dist second "+ second);    double distance = 0;    int firstI, secondI;    for (int p1 = 0, p2 = 0; 	 p1 < first.numValues() || p2 < second.numValues();) {      if (p1 >= first.numValues()) {	// model !! todo numinstances might change	firstI = m_Model.numAttributes();      } else {	// only in case instance is sparseInstance, firstI is different to p1 	firstI = first.index(p1);       }      if (p2 >= second.numValues()) {	secondI = m_Model.numAttributes();      } else {	secondI = second.index(p2);      }      // ignore class values      if (firstI == m_Model.classIndex()) {	p1++; continue;      }       if (secondI == m_Model.classIndex()) {	p2++; continue;      }       double diff;      if (firstI == secondI) {	diff = difference(firstI, 			  first.valueSparse(p1),			  second.valueSparse(p2));	p1++; p2++;      } else if (firstI > secondI) {	diff = difference(secondI, 			  0, second.valueSparse(p2));	p2++;      } else {	diff = difference(firstI, 			  first.valueSparse(p1), 0);	p1++;      }      distance += diff * diff;    }    distance = Math.sqrt(distance / m_NumAttributesUsed);    return distance;  }