-
Notifications
You must be signed in to change notification settings - Fork 199
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
Implement Stitch
trait
#1087
Implement Stitch
trait
#1087
Commits on Jul 26, 2024
-
feat: implement a stitch trait
This trait is a non-panicking alternative for the `BooleanOps::union` and actually doesn't modify the location of any of the coordinates. Instead it returns an error in failing scenarios. Co-Authored-By: RobWalt <robwalter96@gmail.com> Co-Authored-By: Azorlogh <bott.alix@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 36539f3 - Browse repository at this point
Copy the full SHA 36539f3View commit details -
test: add test and fixup small details of algorithm
Co-Authored-By: RobWalt <robwalter96@gmail.com> Co-Authored-By: Azorlogh <bott.alix@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0bc9a60 - Browse repository at this point
Copy the full SHA 0bc9a60View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8c36a0 - Browse repository at this point
Copy the full SHA e8c36a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 183939e - Browse repository at this point
Copy the full SHA 183939eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3193aea - Browse repository at this point
Copy the full SHA 3193aeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ad39c5 - Browse repository at this point
Copy the full SHA 1ad39c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e60b490 - Browse repository at this point
Copy the full SHA e60b490View commit details -
Configuration menu - View commit details
-
Copy full SHA for e174944 - Browse repository at this point
Copy the full SHA e174944View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8fb3b2 - Browse repository at this point
Copy the full SHA e8fb3b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6475a0d - Browse repository at this point
Copy the full SHA 6475a0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e28848e - Browse repository at this point
Copy the full SHA e28848eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 113e6a4 - Browse repository at this point
Copy the full SHA 113e6a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb6c425 - Browse repository at this point
Copy the full SHA bb6c425View commit details -
Configuration menu - View commit details
-
Copy full SHA for 148a071 - Browse repository at this point
Copy the full SHA 148a071View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3afde3f - Browse repository at this point
Copy the full SHA 3afde3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b72963c - Browse repository at this point
Copy the full SHA b72963cView commit details -
fix(review): doc comment formatting
Adding a code block around a ASCII drawing to preserve monospace rendering in docs. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 854d51d - Browse repository at this point
Copy the full SHA 854d51dView commit details -
chore(benches): add stitch benchmark
This benchmark was added to meassure performance improvements for the stitching algorithm. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 346df1d - Browse repository at this point
Copy the full SHA 346df1dView commit details -
perf(stitch): improve line comparison
The previous implementation created a whole new line to check if one of the lines was the inverse of the other. Removing this construction and inlining the function got us a good performance improvement. improvement: -27% Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c2e4337 - Browse repository at this point
Copy the full SHA c2e4337View commit details -
perf(stitch): n^2 loop to fold
Instead of iterating through all n^2 possibilities we can just iterate through the vector once (n^1) and kick out duplicates if we find some. This results in the same return values as before and is significantly faster. improvement: -88% Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2e782e2 - Browse repository at this point
Copy the full SHA 2e782e2View commit details -
perf(stitch): idomatic std use
Making the code mildly more idiomatic resulted in performance gains. improvement: -8% Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3e69011 - Browse repository at this point
Copy the full SHA 3e69011View commit details -
Minor removals of clones, but not really. It showed up as a small performance improvement in the benchmark but I'm not confident it's really an improvement. improvement: maybe -2.5% Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e2f071 - Browse repository at this point
Copy the full SHA 9e2f071View commit details -
fix(review): typo for consistency
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9c4c392 - Browse repository at this point
Copy the full SHA 9c4c392View commit details -
chore(comments): add perf comments
Leave some nice comments for the after world and also tell the future developers to benchmark their optimizations! Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4a3cefd - Browse repository at this point
Copy the full SHA 4a3cefdView commit details -
docs(stitch): clarify edge cases
In the review process we figured that this still was a bit ambiguous. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 32531e8 - Browse repository at this point
Copy the full SHA 32531e8View commit details -
adding more details to the `find_boundary_lines` functions since it's quiet important for performance to get the cencepts right there Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f55ebb6 - Browse repository at this point
Copy the full SHA f55ebb6View commit details -
refactor(stitch): macro function dispatch
Factor out common code and call it directly in the `Triangle` and `MultiPolygon` impls to prevent needless cloning and indirection. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5748e8e - Browse repository at this point
Copy the full SHA 5748e8eView commit details -
chore(cleanup): docs + simplifications
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4297322 - Browse repository at this point
Copy the full SHA 4297322View commit details -
fix(review): special case the algo to triangles only
As stated in one of the review comments, the main purpose of the algo is to stitch together triangles that resulted from a triangulation. Although it would also be nice to generalize the algo for polygons and multi polygons, it makes the code harder to read. It is advised to just triangulate in those cases and then run the stitching on the compound triangulation. On another note: special casing the algorithm to triangles also gave us a real good performance boost again. We gained another ~50% boost from all of the improvements in this commit. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 173d7bc - Browse repository at this point
Copy the full SHA 173d7bcView commit details -
chore(cleanup): use pr suggestions
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fb958f0 - Browse repository at this point
Copy the full SHA fb958f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dbaaa0 - Browse repository at this point
Copy the full SHA 5dbaaa0View commit details -
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 22ee4fa - Browse repository at this point
Copy the full SHA 22ee4faView commit details -
fix(review): don't use custom capacity
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 95c0851 - Browse repository at this point
Copy the full SHA 95c0851View commit details -
chore(cleanup): remove unused error variants
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 47f9f28 - Browse repository at this point
Copy the full SHA 47f9f28View commit details -
feat(visibility): make it all pub(crate)
We decided to do this since we're not sure yet about how users might use this functionality. In the worst case the API is still confusing and leads to a lot of error reports due to the implicit assumptions which are only documented in doc strings and not enforced by code or won't be caught by errors Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8b5e5b9 - Browse repository at this point
Copy the full SHA 8b5e5b9View commit details -
docs(stitch): improve doc string
Add some notes that triangles shouldn't even overlap instead of just stating that duplicates are not allowed. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 45f14ca - Browse repository at this point
Copy the full SHA 45f14caView commit details -
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d0db3e1 - Browse repository at this point
Copy the full SHA d0db3e1View commit details -
chore(cleanup): comment benchmark out
This benchmark needs a public export of the stitch trait which isn't given anymore. I added some comments for the after world. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b1ae9f9 - Browse repository at this point
Copy the full SHA b1ae9f9View commit details -
fix(tests): comment out failing doc test
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c08f84c - Browse repository at this point
Copy the full SHA c08f84cView commit details -
refactor(helpers): move triangle winding function
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 42d6906 - Browse repository at this point
Copy the full SHA 42d6906View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9927e71 - Browse repository at this point
Copy the full SHA 9927e71View commit details -
Configuration menu - View commit details
-
Copy full SHA for c182742 - Browse repository at this point
Copy the full SHA c182742View commit details -
chore: improve explaining comment
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for eaa66ac - Browse repository at this point
Copy the full SHA eaa66acView commit details -
chore(tests): use
Relate
for testingAuthored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a93c511 - Browse repository at this point
Copy the full SHA a93c511View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39c0349 - Browse repository at this point
Copy the full SHA 39c0349View commit details -
Configuration menu - View commit details
-
Copy full SHA for 715a319 - Browse repository at this point
Copy the full SHA 715a319View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ecbd1e - Browse repository at this point
Copy the full SHA 4ecbd1eView commit details