higra / Higra

Hierarchical Graph Analysis
Other
98 stars 20 forks source link

Memory usage of the tree structure #225

Closed PerretB closed 3 years ago

PerretB commented 3 years ago

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.