The tree structure now has a default overhead of 4n * 8 bytes to store children (with n the number of vertices). Removing this overhead would allow to process larger trees if the children information is not needed.
A possible solution is to introduce a lazy computation strategy: children would be computed only if required and then stored as usual. In Python this could be completely transparent to users but an explicit call to a function requesting children in C++ might be required.
The tree structure now has a default overhead of
4n * 8
bytes to store children (withn
the number of vertices). Removing this overhead would allow to process larger trees if the children information is not needed.A possible solution is to introduce a lazy computation strategy: children would be computed only if required and then stored as usual. In Python this could be completely transparent to users but an explicit call to a function requesting children in C++ might be required.