-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Update geometry/nearest_points.md, adding a randomized algorithm explanation #1473
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
Conversation
Explanation of randomized algorithms for closest pair of points.
…orrect visualization
|
@adamant-pwn Please someone check this PR! |
|
Wow, this is a significant contribution !Thank you. I'll try to read this soon and give input. |
|
Some of the math @jxu might be good at too in addition to @adamant-pwn. Briefly, the last expressions are not rendering properly. That might be a spacing issue: Lol it works in GitHub haha. |
Quick edits. Rendering
|
Given the complexity, it may make sense to add basic tests to our suite. Personally, I'd prefer proofs to be in one of those drop downs as I'm not as mathematically inclined and am likely to skip over it unless I'm really interested. It's probably prudent to include the worst case time and scenarios in which they fail expectation. The math claims will likely require hours to really sit down and verify for me but I'm hoping some of the other guys can chime in. PS I'm not sure if we've standardized the site as American English or British English spellings ( I noticed practise vs practice.) |
|
Thanks for the useful changes @mhayter !!! I think I fixed the issue with the equation, block equations need to be surrounded by newlines apparently. How could this thing of having a dropdown for the proof be implemented? (EDIT: done!) |
|
The current code does not compile: candidate_closest does not exist. Also, I'd consider accepting references in the dist function and also changing the name of dis generator as it looks very similar. |
Replace "cube" with "square" Co-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
Better formatting Co-authored-by: Oleksandr Kulkov <adamant.pwn@gmail.com>
|
Are there any other changes required? @adamant-pwn |
|
Ping :) |
adamant-pwn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patience! 🙏
I think the current version looks good, it should be ok to merge. Thanks a lot!
|
Congrats @izanbf1803 and @adamant-pwn ! |
|
Thanks @mhayter and @adamant-pwn for helping me improve it! :) |
The new explanation adds two randomized algorithms that have linear expected runtime. One of them being much simpler to implement and remember than the traditional divide and conquer algorithm, and improving its runtime efficiency. An implementation for the first one is provided. An image is included to clarify the strategy of the first randomized algorithm.