convexhull_Grahamscan

所属分类:其他
开发工具:Others
文件大小:2KB
下载次数:12
上传日期:2009-01-20 12:08:55
上 传 者lynn2009
说明:  Input : A set S of planar points Output : A convex hull for S Step 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return. Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR . Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull(SL) and Hull(SR) respectively. Step 4: Apply the merging procedure to merge Hull(SL) and Hull(SR) together to form a convex hull. Time complexity: T(n) = 2T(n/2) + O(n) = O(n log n)
(Input: A set S of planar pointsOutput: A convex hull for SStep 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return.Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR. Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull (SL) and Hull (SR) respectively.Step 4: Apply the merging procedure to merge Hull (SL) and Hull (SR) together to form a convex hull. Time complexity: T (n) = 2T (n/2)+ O (n) = O (n log n))

文件列表:
convex hull\convex hull.cpp (6712, 2008-12-22)
convex hull (0, 2009-01-20)

近期下载者

相关文件


收藏者