INNER CODE UNIT · Python

tokens

astroautomata/SymbolicRegression.jl · benchmark/analyze.py:40

            tokens = l[-1].split()
            time = int(tokens[0])
            info = " ".join(tokens[1:])
            new_node = Node()
            new_node.data = {"time": time, "info": info, "indent": indent}
            new_node.parent = parent
            collect_children(new_node, line_idx + 1)
            new_node.children = sorted(new_node.children, key=lambda n: -n.data["time"])
            parent.children.append(new_node)

    return


root = Node()
root.data = {"time": 0, "info": "", "indent": 4}
collect_children(root, 0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…