• 大小: 211KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-17
  • 语言: Matlab
  • 标签: 未分类  

资源简介

matlab开发-KDTreeNearestNeighborandRangeSearch搜索。KD树范围和最近邻搜索。

资源截图

代码片段和文件信息

% FUNCTION kdtree = kdtree_create(points)
%
% AUTHOR:     Steven Michael
%             (smichael@ll.mit.edu)
%
% DATE:       2/17/05
%
% DEscriptION:
%
%  This function creates a KD Tree from the given points
%  and outputs it in the abstract object “kdtree“
%  The “kdtree“ object can then be used for range finding
%  and nearest neighbor searching.
%
% INPUTS:
%
%   points   :     A (npoints X ndim) array of points where “npoints“
%                  is the number of points and “ndim“ is the number
%                  of dimensions.  Note that the points even if they
%                  are double precision will be converted to single
%                  precision when the tree is populated.  This is for 
%                  speed -- most kdtree search applications don‘t
%                  necessitate double precision data.
%
% OUTPUTS:
%
%   kdtree   :     The abstract KD Tree object.
%
%
% Example: 

%    % Create a list of 1000 random points in 3d space
%    r = rand(10003);

%    % Create a tree from this list
%    tree = kdtree(r);

%    % Find the point closest to the origin
%    [pntidxpntval] = kdtree_closestpoint(tree[0 0 0]);
%
%    % Create a list “r2“ of 100 random points in 3d space and
%    % find the points in “r“ that are closest to each point in “r2“
%    [pntidxpntval] = kdtree_closestpoint(treer2);
%
%    % Find all the points within the cube defined by “rng“
%    rng = [ [.45 .55]; [.45 .55]; ; [.45 .55] ];
%    pntidx = kdtree_range(treerng);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1739  2008-03-31 14:30  kdtree\@kdtree\kdtree_closestpoint.m
     文件       17453  2008-03-31 20:52  kdtree\@kdtree\kdtree.mexglx
     文件       17650  2008-03-31 20:52  kdtree\@kdtree\kdtree_range.mexglx
     文件        2491  2008-03-31 14:30  kdtree\@kdtree\kdtree_range.m
     文件       19888  2008-03-31 20:51  kdtree\@kdtree\kdtree_closestpoint.mexa64
     文件       89088  2008-03-31 18:05  kdtree\@kdtree\kdtree_closestpoint.mexw32
     文件       21072  2008-03-31 20:51  kdtree\@kdtree\kdtree_range.mexa64
     文件       88064  2008-03-31 18:05  kdtree\@kdtree\kdtree_range.mexw32
     文件       94720  2008-03-31 18:05  kdtree\@kdtree\kdtree.mexw32
     文件       21253  2008-03-31 20:51  kdtree\@kdtree\kdtree.mexa64
     文件       17028  2008-03-31 20:52  kdtree\@kdtree\kdtree_closestpoint.mexglx
     文件        1546  2008-03-31 14:30  kdtree\@kdtree\kdtree.m
     文件        2949  2008-03-31 18:05  kdtree\winmake\kdtree\kdtree.mk
     文件        2664  2008-03-31 17:55  kdtree\winmake\kdtree\kdtree.vcproj
     文件        8704  2008-03-31 18:06  kdtree\winmake\kdtree.suo
     文件         889  2008-03-31 14:34  kdtree\winmake\kdtree.sln
     文件        3886  2008-03-31 20:56  kdtree\README.txt
     文件        1483  2008-03-31 20:54  kdtree\Makefile
     文件       12988  2008-03-31 14:30  kdtree\src\kdtree.cpp
     文件        3086  2008-03-31 14:30  kdtree\src\kdtree_closestpoint.cpp
     文件        4213  2008-03-31 14:30  kdtree\src\kdtree_range.cpp
     文件        2628  2008-03-31 14:30  kdtree\src\kdtree_create.cpp
     文件        1872  2008-03-31 14:30  kdtree\src\kdtree.h
     文件        1314  2014-02-12 12:12  license.txt

评论

共有 条评论