S2ClosestPointQueryBaseOptions.maxError

Specifies that points up to max_error() further away than the true closest points may be substituted in the result set, as long as such points satisfy all the remaining search criteria (such as max_distance). This option only has an effect if max_points() is also specified; otherwise all points closer than max_distance() will always be returned.

Note that this does not affect how the distance between points is computed; it simply gives the algorithm permission to stop the search early as soon as the best possible improvement drops below max_error().

This can be used to implement distance predicates efficiently. For example, to determine whether the minimum distance is less than D, the IsDistanceLess() method sets max_points() == 1 and max_distance() == max_error() == D. This causes the algorithm to terminate as soon as it finds any point whose distance is less than D, rather than continuing to search for a point that is even closer.

DEFAULT: Distance::Delta::Zero()

class S2ClosestPointQueryBaseOptions(Distance)
const
maxError
()

Meta