void TDecisionTree::TNode::CopyNode(const TNode& Node) { CleanUp(); CutFtrN = Node.CutFtrN; CutFtrVal = Node.CutFtrVal; NExamples = Node.NExamples; ClassHist = Node.ClassHist; FtrHist = Node.FtrHist; if (Node.HasLeft()) { Left = new TNode(Tree); Left->CopyNode(*Node.Left); } if (Node.HasRight()) { Right = new TNode(Tree); Right->CopyNode(*Node.Right); } }