MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / main

Function main

divide_and_conquer/convex_hull.py:480–503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

478
479
480def main():
481 points = [
482 (0, 3),
483 (2, 2),
484 (1, 1),
485 (2, 1),
486 (3, 0),
487 (0, 0),
488 (3, 3),
489 (2, -1),
490 (2, -4),
491 (1, -3),
492 ]
493 # the convex set of points is
494 # [(0, 0), (0, 3), (1, -3), (2, -4), (3, 0), (3, 3)]
495 results_bf = convex_hull_bf(points)
496
497 results_recursive = convex_hull_recursive(points)
498 assert results_bf == results_recursive
499
500 results_melkman = convex_hull_melkman(points)
501 assert results_bf == results_melkman
502
503 print(results_bf)
504
505
506if __name__ == "__main__":

Callers 1

convex_hull.pyFile · 0.70

Calls 3

convex_hull_bfFunction · 0.85
convex_hull_recursiveFunction · 0.85
convex_hull_melkmanFunction · 0.85

Tested by

no test coverage detected