You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm missing something, but it seems like with some algorithms there is an advantage to passing in the function that does the comparison. As an example, I'm computing line segment intersections with a sweep line algorithm. I wanted to try your BTree or SortedSet because my current data structure (a red black tree) seems slow. But it's difficult to use these classes because I need a comparison function that uses state from the algorithm: the sweep line, current point, etc. I can get around this by adding a reference to every single element in the SortedSet, but they were just integers, so that's at least doubled the storage needed per element.
The text was updated successfully, but these errors were encountered:
Maybe I'm missing something, but it seems like with some algorithms there is an advantage to passing in the function that does the comparison. As an example, I'm computing line segment intersections with a sweep line algorithm. I wanted to try your
BTree
orSortedSet
because my current data structure (a red black tree) seems slow. But it's difficult to use these classes because I need a comparison function that uses state from the algorithm: the sweep line, current point, etc. I can get around this by adding a reference to every single element in theSortedSet
, but they were just integers, so that's at least doubled the storage needed per element.The text was updated successfully, but these errors were encountered: