Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Gift wrapping algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Complexity== The inner loop checks every point in the set ''S'', and the outer loop repeats for each point on the hull. Hence the total run time is <math>O(nh)</math>. The run time depends on the size of the output, so Jarvis's march is an [[output-sensitive algorithm]]. However, because the running time depends [[linear time|linearly]] on the number of hull vertices, it is only faster than <math>O(n \log n)</math> algorithms such as [[Graham scan]] when the number ''h'' of hull vertices is smaller than log ''n''. [[Chan's algorithm]], another convex hull algorithm, combines the logarithmic dependence of Graham scan with the output sensitivity of the gift wrapping algorithm, achieving an asymptotic running time <math>O(n \log h)</math> that improves on both Graham scan and gift wrapping.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)