📝Syntax
Mdl = KDTreeSearcher(X)
Mdl = KDTreeSearcher(X, Name, Value)
[idx, D] = knnsearch(Mdl, Y, Name, Value)
[idx, D] = rangesearch(Mdl, Y, radius, Name, Value)
📄Description
KDTreeSearcher stores a set of points and the distance metric used
to query them, so that nearest neighbor searches can be run against the
same data with knnsearch and rangesearch. The object exposes
the properties X, Distance, DistParameter and
BucketSize.
The searches delegate to the knnsearch and rangesearch
functions, forwarding the distance metric stored on the object.