大数据集最小包围球的简单高效加速方法
1. 引言
在二维平面(E2)中寻找给定点的最小包围圆,或者在一般的 k 维空间(Ek)中寻找包围球的问题,已经被研究了很长时间,并且有许多算法和改进版本被提出。例如,1857 年 Sylvester 首次对该问题进行了表述,后来也有其他人继续研究。Megiddo 算法等也被相继提出。
1991 年,Welzl 提出了一种有趣的方法,这是一种“暴力”递归算法,通过随机选择点来实现显著的加速。然而,由于递归调用深度过深,它不能直接用于处理大数据集。最初的 Welzl 算法存在部分错误,Matoušek、Sharir 和 Welzl 发布了修正版本,即 MSW 算法。
以下是 MSW 算法的代码:
Algorithm 1. MSW - Matousek, Sharir, Welzl’s algorithm
Require: Finite sets P and R of points in the plane |R| = 3
Ensure: Minimal disk enclosing P ∪R
if P is empty then
return trivial(R)
end if
choose p in P
▷randomly and uniformly
D := msw(P −{p}, R)
if p is in P then
return(D)
end if
q = nonbase(R ∪{p})
▷Welzl’s algorithm for 4 points could be used to find what would not be
超级会员免费看
订阅专栏 解锁全文
1226

被折叠的 条评论
为什么被折叠?



