예제 #1
0
파일: DecisionTree.php 프로젝트: jasny/Q
 /**
  * Add a node to the tree.
  * 
  * @param DecisionTree_Node $node
  */
 function addNode(DecisionTree_Node $node)
 {
     $id = $node->getId();
     if (isset($this->nodes[$id])) {
         throw new Exception("Node with id " . $node->id() . " is already part of the tree.");
     }
     $node->_bind($this);
     $this->nodes[$id] = $node;
 }