软件构造(1)海龟绘图问题7——对凸包问题的分析、困惑与解决

此处是链接<----MIT海龟绘图1.问题描述Problem 7: Convex hullsImplement convexHull, which computes the convex hull, the smallest convex set that contains all the points in a set of input points. The gift-wrappi...
摘要由CSDN通过智能技术生成

此处是链接<----MIT海龟绘图

1.问题描述

Problem 7: Convex hulls

Implement convexHull, which computes the convex hull, the smallest convex set that contains all the points in a set of input points. The gift-wrapping algorithm is one simple approach to this problem, and there are other algorithms too. Remember that 6.031 focuses on SFB/ETU/RFC, so your code will not be judged by its performance.

The specification comment above convexHull requires you to return the “minimal subset of the input points that form the vertices of the perimeter of the convex hull.” This statement is well-defined on any set of input points. What should you do for a set of 2 points? 1 point? 0 points? What should you do for a point that lies on an edge of the convex hull, but is not a vertex of that edge?

For information on how to use Java’s Set interface and classes implementing it, look up java.util.Set in the Java library documentation.

JUnit checkpoint. At this point, you should have a green check for every test when you run JUnit, and a satisfying   big green bar  .

Commit to Git. Once you’re happy with your solution for this problem, commit and push!

上面的描述用中文说就是:

给你一个点的集合 S S S,请你找出这个集合的子集 S 1 S_1 S1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值