ygg
ygg copied to clipboard
Question: Tree with NodeUpdater
Hi!
Can I somehow make work *Tree with a sort of "Combiner" (like from DynamicIntervalTree)?
I would like to have a balanced binary tree with a custom metadata inside and a hook from a tree implementation to recalculate metadata, based on children metadata.
For example, if I want to have (key -> value) mapping, sorted by key. And in each node as a metadata: sum of values in a subtree, number of elements in that subtree available.
Is this somehow possible with that library? (I'm looking for some solution to replace gnu::pb_ds in my project)
Thank you for answer!