int theSubset = whichSubset(instance);  if (theSubset <= -1) return m_distribution.prob(classIndex); else if (Utils.gr(m_distribution.perBag(theSubset),0)) return m_distribution.prob(classIndex,theSubset); else
if (theSubset <= -1) { double [] weights = weights(instance); if (weights == null) { return m_distribution.prob(classIndex); } else { double prob = 0; for (int i = 0; i < weights.length; i++) { prob += weights[i] * m_distribution.prob(classIndex, i); } return prob; } } else { if (Utils.gr(m_distribution.perBag(theSubset), 0)) { return m_distribution.prob(classIndex, theSubset); } else {
  public final double classProb(int classIndex,Instance instance)       throws Exception {    int theSubset = whichSubset(instance);        if (theSubset <= -1)      return m_distribution.prob(classIndex);    else      if (Utils.gr(m_distribution.perBag(theSubset),0))	return m_distribution.prob(classIndex,theSubset);      else	if (m_distribution.maxClass() == classIndex)	  return 1;	else	  return 0;  }