public static DecisionTreeNode2 MapNode(DecisionTreeNode node)
 {
     return(new DecisionTreeNode2
     {
         FeatureIndex = node.FeatureIndex,
         OriginalIndex = node.FeatureIndex,
         //Cover = node.Cover,
     });
 }
        public static void ExpandPaths(List <DecisionTreeNode2[]> results, List <DecisionTreeNode2> currentPath, DecisionTreeNode[] nodes, DecisionTreeNode currentNode)
        {
            var n = MapNode(currentNode);

            currentPath.Add(n);
            if (currentNode.FeatureIndex == DecisionTree.LeafIndex)
            {
                results.Add(currentPath.ToArray());
            }
            else
            {
                ExpandPaths(results, currentPath, nodes, nodes[currentNode.TrueBranch]);
                ExpandPaths(results, currentPath, nodes, nodes[currentNode.FalseBranch]);
            }
            currentPath.Remove(n);
        }