Package org.encog.ml.tree.traverse

Examples of org.encog.ml.tree.traverse.DepthFirstTraversal


   * @param node The tree node.
   * @return The node count.
   */
  public static int process(TreeNode node) {
    TaskCountNodes task = new TaskCountNodes();
    DepthFirstTraversal trav = new DepthFirstTraversal();
    trav.traverse(node, task);
    return task.getNodeCount();
  }
View Full Code Here


   * @param replaceThisNode The node to replace.
   * @param replaceWith What to replace with.
   */
  public static void process(TreeNode rootNode, TreeNode replaceThisNode, TreeNode replaceWith) {
    TaskReplaceNode task = new TaskReplaceNode(replaceThisNode, replaceWith);
    DepthFirstTraversal trav = new DepthFirstTraversal();
    trav.traverse(rootNode, task);
  }
View Full Code Here

   * @param node The tree node to search from.
   * @return The tree node for the specified index.
   */
  public static TreeNode process(int index, TreeNode node) {
    TaskGetNodeIndex task = new TaskGetNodeIndex(index);
    DepthFirstTraversal trav = new DepthFirstTraversal();
    trav.traverse(node, task);
    return task.getResult();
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.tree.traverse.DepthFirstTraversal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.