How to compare two shapes?
问题 Is there a way to compare two geometric shapes (or any two more generic data structures), without using the brute force when a tolerance is involved? The brute force (that is comparing each value of each object against each value of the other object) works but it's slow, and I can't use it. I tried sorting the data and comparing two sorted collections. It's fast, but it only works with zero tolerance. As soon as I add the tolerance I get lost. The problem is that two values can be identical