📄 compute_nn_distance.m
字号:
function [D,nn_list] = compute_nn_distance(X,nbr_nn, options)
% compute_nn_distance - compute the distance to the nearest neighbors
%
% [D,nn_list] = compute_nn_distance(X,nbr_nn, options);
%
% X is a (d,n) set of n points in R^d
% nbr_nn is the number of nearest neighbors to retrieve
%
% D is a (n,nbr_nn) matrix of distance, D(i,j) is distance between point
% X(:,i) and point X(nn_list(i,j),:)
% nn_list(i,:) is the set of nearst neighbors
%
% options.use_nntools = 0 force the use of the slow matlab code
% for nearest neighbors computations.
%
% options.exlude_self = 1 to avoid taking a point it self neighbor.
%
% Copyright (c) 2006 Gabriel Peyr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -