我假设总共有 N 个数据点,复杂的外壳由 M 个点定义。
维护 Convex Hull 应该比一开始就建造它要容易得多(而且成本更低)。
删除现有数据点
1/ If the data point in not one of the M points defining the convex hull then it won’t affect the hull so just remove it.
2/ If it is part of the convex hull then you need to adjust the hull – more on that below in point 4
添加一个新的数据点。
3/ If a data point is inside the complex hull then it will not affect the hull.
这是一个简单的方法来测试我的头脑。创建船体内部的三角剖分。使用 M 个点定义的复杂船体可以三角剖分为 M-2 个三角形。然后测试该点是否位于三角形之一。
4/ if a data point is outside the hull then it will become part of the hull. However, it is only affecting a local area of the hull and it is straightforward to find the new hull in a few steps. If you have already build the hull then it should be clear to you how to adjust a local part of it.
我看不出这种维护怎么可能是 O(N)