compute_nn_graph.m
来自「toolbox_dimreduc - a toolbox for dimensi」· M 代码 · 共 19 行
M
19 行
function [D,A] = compute_nn_graph(X,options)
% compute_nn_graph - compute nearest neighbor graph
%
% [D,A] = compute_nn_graph(X,options);
%
% X is an array of points, size must be (dimension x nbr_points)
% X(:,i) is the ith point.
%
% D is the graph matrix : D(i,j)==Inf if point i and j are not connected,
% D(i,j)=|X(:,i)-X(:,j)| otherwise
%
% The graph can be computed using two modes:
% options.nn_epsilon=dist_between_NN ==> use epsilon-based NN mode
% options.nn_nbr=#NN ==> use k-based NN mode.
% options.nn_automatic=#NN ==> evaluate epsilon to match the
% k-NN (tends to prune outliers.
%
% Copyright (c) 2005 Gabriel Peyr
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?