What is algorithm used in rangesearch function in matlab
1 次查看(过去 30 天)
显示 更早的评论
Hi
I worked with rangesearch function in Matlab for my project. https://uk.mathworks.com/help/stats/rangesearch.html
It does work well.
I would like to get your advice if it is relevant.
What is the algorithm behind the rangesearch function in matlab?
I found several papers about the fixed-radius nearest neighbor but i'm worry if the algorithm i write in my paper is not the actual algorithm applied in rangesearch function in Matlab
Thanks in advance
0 个评论
采纳的回答
Walter Roberson
2018-5-21
15 个评论
Walter Roberson
2018-8-20
Mathworks replied to me:
==== begin quote ====
I have reviewed the functions in the “KDTreeSearcher” class, and I can confirm that its default behavior corresponds to the k-d tree algorithm created by Friedman, Bentely, and Finkel and published in the paper you mentioned.
It is important to note that most functions that invoke the “KDTreeSearcher” class first build the k-d tree, then search it. The computational cost of building the tree is not considered by Friedman et al. in their published efficiently gains. For that reason, situations can be constructed where an exhaustive search algorithm can be more efficient than building and searching a k-d tree. If you are interested in determining the amount of time spent searching the tree, not building it, the following example code can be used:
>> x_data = rand(1e5,2);
>> y_data = rand(10,2);
>> r = 0.3;
>> profile on
>> rangesearch(x_data,y_data,r);
>> profile viewer
The time taken by the search algorithm is displayed next to “KDTreeSearcher.rangesearch”
更多回答(1 个)
the cyclist
2018-5-21
There are typically two places to look for algorithm references for MATLAB function:
- The documentation page for that function
- Inside the function itself: Use "type function_name" to get a listing of the function, and look there (especially near the top of the file, but sometimes inline where subfunctions are called)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!