-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster sssp' equivalent? #253
Comments
Oh thanks for reporting this. There shouldn't really be a need to retriangulate at all; i.e. it be possible to use the same triangulation for all starting points. It seems the current implementation also always just starts from a fixed vertex (thus forcing you to retriangulate to somehow select the right vertex). I still have to port the SSSP implementation to the new HGeometry 1 setup anway; that seems like a good time to try and fix this as well. edit: updating the PlaneGraph representation directly may be more challenging (it's pretty specific so that we can do a lot of basic "query" operations in O(1) time. But it is a bit difficult to update it). |
Thanks! Adding an integer parameter to sssp index trig =
ssspFinger (PlaneGraph.numVertices trig) d
where
Just v0 = fst <$> V.find (\(_vid, VertexData _ idx) -> idx == index) (vertices trig)
... |
Great! That was actually even simpler than I had expected (I didn't write that part of the code myself) |
Hi! I need to find a shortest path inside a simple polygon between each pair of polygon's vertices. Currently, I have to call
sssp . triangulate
fromAlgorithms.Geometry.SSSP
for a polygon, then rotate it by 1 to the right and repeat until all starting points are processed. This is extremely slow and at least triangulation step can be somehow avoided. I tried the following to "rotate" the triangulation:This is faster but very GC expensive. Can I do the same without converting to adjrep and back? I cannot understand how
PlaneGraph
works,Gr
seems to be easier to understand, this is why I used it. Or maybe I am doing it completely wrong?The text was updated successfully, but these errors were encountered: