MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / my_tree

Class my_tree

toolbench/inference/Tree/Tree.py:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import math
6
7class my_tree:
8 def __init__(self):
9 self.root = tree_node()
10 self.now_deal_node = self.root
11
12
13 def to_json_recursive(self,use_messages=False):
14 tree_structure = self.root.to_json_recursive(use_messages=use_messages)
15 js_obj = {
16 "size": self.root.get_size(),
17 "max_length":self.root.get_max_depth(),
18 "tree": tree_structure,
19 }
20 return js_obj
21
22
23class tree_node:

Callers 2

startMethod · 0.90
startMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected