geneticengine.representations.tree.utils

Module Contents

Functions

relabel_nodes(i, g[, is_list])

Recomputes node specifics in the tree.

relabel_nodes_of_trees(i, g)

Recomputes all the nodes, depth and distance_to_term in the tree.

get_nodes_depth_specific(i, g)

geneticengine.representations.tree.utils.relabel_nodes(i, g, is_list=False)

Recomputes node specifics in the tree. Returns the number of nodes,

distance to terminal (depth), typed this way, and the weighted number of nodes (counting depth points instead of nodes).

Parameters:
Return type:

tuple[int, int, dict[type, list[Any]], int]

geneticengine.representations.tree.utils.relabel_nodes_of_trees(i, g)

Recomputes all the nodes, depth and distance_to_term in the tree.

Parameters:
Return type:

geneticengine.solutions.tree.TreeNode

geneticengine.representations.tree.utils.get_nodes_depth_specific(i, g)
Parameters: