finesse.tree.TreeNode.draw_tree¶
- TreeNode.draw_tree(self, fn_name=None, title=None, show_max_children=None)¶
Draws the solution tree in text form.
Based on https://stackoverflow.com/a/49638425/2251982.
- Parameters:
- fn_namecallable, optional
Function to return the name of a
TreeNode
given theTreeNode
itself. Defaults to usingTreeNode.name
.- titlestr, optional
The tree title. If not specified, no title is printed.
- show_max_childrenint, optional
Maximum number of children to show in the tree; defaults to showing all children.
- Returns:
- str
The tree in textual form.