文件名称:BruteSearch
介绍说明--下载内容来自于网络,使用问题请自行百度
K-nearest neighbors 搜索 聚类时经常使用的一种方法 国外网站转载- The following utilities are provided:
- Nearest neighbor
- K-Nearest neighbors
- Radius Search
They al supports N-dimensions and work on double, it is possible to choose if return the distances.
Here is a time comparison with a vectrized m-code:
N=1000000 number of reference points
Nq=100 number of query points
dim=3 dimension of points
k=3 number of neighbor
tic
[idc,dist]=BruteSearchMex(p ,qp , k ,k) MEX
toc
tic
[idc,dist]=knnsearch(qp,p,k) VECTORIZED M-CODE
toc
p=rand(N,dim)
qp=rand(Nq,dim)
Output:
Elapsed time is 0.962640 seconds.
Elapsed time is 18.813100 seconds.
- Nearest neighbor
- K-Nearest neighbors
- Radius Search
They al supports N-dimensions and work on double, it is possible to choose if return the distances.
Here is a time comparison with a vectrized m-code:
N=1000000 number of reference points
Nq=100 number of query points
dim=3 dimension of points
k=3 number of neighbor
tic
[idc,dist]=BruteSearchMex(p ,qp , k ,k) MEX
toc
tic
[idc,dist]=knnsearch(qp,p,k) VECTORIZED M-CODE
toc
p=rand(N,dim)
qp=rand(Nq,dim)
Output:
Elapsed time is 0.962640 seconds.
Elapsed time is 18.813100 seconds.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
BruteSearchMex.cpp
BruteSearchTranspose.cpp
TestBruteSearch.m
BruteSearchTranspose.cpp
TestBruteSearch.m
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.