Hello and thanks for the pkg!
I'm interested in merging values into existing ranges, to not duplicate memory with overlapping ranges and repeat values.
But to do that it seems I need to find the existing values AllIntersections() and insert a new interval. However I can't remove the existing intervals since it does not return their start/ends.
I could imagine an option to the tree that would enable a merge feature, however I believe that would need an equal comparison for the value as well.
Alternatively a function that could provide start/end values for all intersections could allow this merge by the caller.
Also another barrier to doing this is the fact that the lock is built in. Would best if the functions were documented as to support a read or readwrite lock, so it could be done externally, and maybe provide a locked wrapper for convenience.
I'll likely fork and do some crude version of these, let me know if you have any direction you'd like and I can get a PR up.
Hello and thanks for the pkg!
I'm interested in merging values into existing ranges, to not duplicate memory with overlapping ranges and repeat values.
But to do that it seems I need to find the existing values AllIntersections() and insert a new interval. However I can't remove the existing intervals since it does not return their start/ends.
I could imagine an option to the tree that would enable a merge feature, however I believe that would need an equal comparison for the value as well.
Alternatively a function that could provide start/end values for all intersections could allow this merge by the caller.
Also another barrier to doing this is the fact that the lock is built in. Would best if the functions were documented as to support a read or readwrite lock, so it could be done externally, and maybe provide a locked wrapper for convenience.
I'll likely fork and do some crude version of these, let me know if you have any direction you'd like and I can get a PR up.