// file: dt_set_2.cc
//

// isip include files
//
#include "decision_tree.h"
#include "decision_tree_constants.h"

// method: set_num_leaf_cc
//
// arguments: none
// 
// return: a logical value indicating status
//
// this method sets the number of leaves in the decision tree by looking
// at the cuttenr leaf list
//
logical_1 Decision_tree::set_num_leaf_cc() {

  // dummy variables
  //
  int_4 count = 0;
  Link_node* node = (Link_node*)NULL;

  // count the number of leaves
  //
  node = leaf_nodes_d->get_head_cc() ;
  while (node!=(Link_node*)NULL) {
    count += 1;
    node = node->get_next_cc();
  }

  // set the number of leaves
  //
  num_leaf_d = count;
    
  return ISIP_TRUE;
}
