I'm currently working on a project that involves traversing arbitrary graphs and establishing the best network design that connects leaf nodes to sub graphs, and the sub graphs back to the main network.
For performance reasons, the node and routes data are stored in different kinds of structures to enable fast look ups of different properties.
We are using a custom min heap, that has a callback that allows us to synchronize the heap with the other structures whenever indexes are swapped. However our Heap code isn't very well optimized and I'd like to move to use this library.
Unfortunately we can't move to this library as we need some mechanism to sync our other data structures with the min heap. I'm imagining every function that modifies the heap having an optional final argument which is this callback. The callback would receive the heap, and the two indexes that are being swapped as arguments.
Would you be interested in a pull request that brings in an optional callback parameter to _siftup and _siftdown?
Alternatively, is there some other approach that may already be available to do this.
I'm currently working on a project that involves traversing arbitrary graphs and establishing the best network design that connects leaf nodes to sub graphs, and the sub graphs back to the main network.
For performance reasons, the node and routes data are stored in different kinds of structures to enable fast look ups of different properties.
We are using a custom min heap, that has a callback that allows us to synchronize the heap with the other structures whenever indexes are swapped. However our Heap code isn't very well optimized and I'd like to move to use this library.
Unfortunately we can't move to this library as we need some mechanism to sync our other data structures with the min heap. I'm imagining every function that modifies the heap having an optional final argument which is this callback. The callback would receive the heap, and the two indexes that are being swapped as arguments.
Would you be interested in a pull request that brings in an optional callback parameter to
_siftup
and_siftdown
?Alternatively, is there some other approach that may already be available to do this.
Thanks