The erase() method furthermore never shrinks & re-hashes the table as this is not permitted by the specification of this function. A linear sequence of random removals without intermediate insertions ...
This algorithm has quadratic run time so it can be slow with very large profiles. The "tangent" method generally produces good results when connecting a discrete polygon to a convex, finely sampled ...