compute_nn_distance.m
来自「toolbox_dimreduc - a toolbox for dimensi」· M 代码 · 共 19 行
M
19 行
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 + =
减小字号Ctrl + -
显示快捷键?