ast_toolbox.mcts.tree_plot module¶
-
ast_toolbox.mcts.tree_plot.add_children(s, s_node, tree, graph, d)[source]¶ Add successors of s into the graph.
Parameters: - s (
ast_toolbox.mcts.AdaptiveStressTesting.ASTState) – The AST state. - s_node (
pydot.Node) – The pydot node corresponding to s. - tree (dict) – The tree.
- graph (
pydot.Dot) – The pydot graph. - d (int) – The depth.
- s (
-
ast_toolbox.mcts.tree_plot.get_root(tree)[source]¶ Get the root node of the tree.
Parameters: tree (dict) – The tree. Returns: s ( ast_toolbox.mcts.AdaptiveStressTesting.ASTState) – The root state.
-
ast_toolbox.mcts.tree_plot.plot_tree(tree, d, path, format='svg')[source]¶ Plot the tree.
Parameters: - tree (dict) – The tree.
- d (int) – The depth.
- path (str) – The plotting path.
- format (str) – The plotting format.
-
ast_toolbox.mcts.tree_plot.s2node(s, tree)[source]¶ Transfer the AST state to pydot node.
Parameters: - s (
ast_toolbox.mcts.AdaptiveStressTesting.ASTState) – The AST state. - tree (dict) – The tree.
Returns: node (
pydot.Node) – The pydot node.- s (