private void handleEnumeratedAttribute(Instances trainInstances) throws Exception {
  Instance instance;
  m_distribution=new Distribution(m_complexityIndex,trainInstances.numClasses());
  Enumeration<Instance> enu=trainInstances.enumerateInstances();
  while (enu.hasMoreElements()) {
    instance=enu.nextElement();
    if (!instance.isMissing(m_attIndex)) {
      m_distribution.add((int)instance.value(m_attIndex),instance);
    }
  }
  if (m_distribution.check(m_minNoObj)) {
    m_numSubsets=m_complexityIndex;
    m_infoGain=infoGainCrit.splitCritValue(m_distribution,m_sumOfWeights);
    m_gainRatio=gainRatioCrit.splitCritValue(m_distribution,m_sumOfWeights,m_infoGain);
  }
}

private void handleEnumeratedAttribute ( Instances trainInstances ) throws Exception { Instance instance ; m_distribution = new Distribution ( m_complexityIndex , trainInstances . numClasses ( ) ) ; Enumeration < Instance > enu = trainInstances . enumerateInstances ( ) ; while ( enu . hasMoreElements ( ) ) { instance = enu . nextElement ( ) ; if ( ! instance . isMissing ( m_attIndex ) ) { m_distribution . add ( ( int ) instance . value ( m_attIndex ) , instance ) ; } } if ( m_distribution . check ( m_minNoObj ) ) { m_numSubsets = m_complexityIndex ; m_infoGain = infoGainCrit . splitCritValue ( m_distribution , m_sumOfWeights ) ; m_gainRatio = gainRatioCrit . splitCritValue ( m_distribution , m_sumOfWeights , m_infoGain ) ; } }
creates split on enumerated attribute .
