コード例 #1
0
 public final ClusNode getTree(int fold) {
   int idx = Arrays.binarySearch(m_Folds, fold);
   ClusNode node = m_Nodes[idx];
   if (node.hasBestTest() && node.atBottomLevel()) {
     OptXValSplit split = null;
     int nb = getNbChildren();
     for (int i = 0; i < nb; i++) {
       OptXValSplit msplit = (OptXValSplit) getChild(i);
       if (msplit.contains(fold)) {
         split = msplit;
         break;
       }
     }
     int arity = node.updateArity();
     for (int i = 0; i < arity; i++) {
       OptXValNode subnode = (OptXValNode) split.getChild(i);
       node.setChild(subnode.getTree(fold), i);
     }
   }
   return node;
 }
コード例 #2
0
 public final void setNode(int fold, ClusNode node) {
   int idx = Arrays.binarySearch(m_Folds, fold);
   m_Nodes[idx] = node;
 }