INNER CODE UNIT · Python

collect_children

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

def collect_children(parent, start_line_idx):

    for line_idx in range(start_line_idx, nlines):

        l = lines[line_idx]
        l = l.split("|")
        indent = len(l) - 1
        same_level = indent == parent.data["indent"]
        if same_level:
            break

        is_child = indent == parent.data["indent"] + 1
        too_nested = indent > 25
        if is_child and not too_nested:
            tokens = l[-1].split()
            time = int(tokens[0])
            info = " ".join(tokens[1:])
            new_node = Node()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…