Ejemplo n.º 1
0
  /**
   * Sets the order added values of the subtree rooted at this splitter node.
   *
   * @param addChild the root of the subtree
   * @param addingTo the tree that this node will belong to
   */
  private final void setOrderAddedSubtree(Splitter addChild, ADTree addingTo) {

    addChild.orderAdded = addingTo.nextSplitAddedOrder();
    for (int i = 0; i < addChild.getNumOfBranches(); i++) {
      PredictionNode node = addChild.getChildForBranch(i);
      if (node != null) {
        for (Enumeration<Splitter> e = node.children(); e.hasMoreElements(); ) {
          setOrderAddedSubtree(e.nextElement(), addingTo);
        }
      }
    }
  }