This is where navigation should be.


GSP_NN_DISTANZ - Compute the nearest neighboor distances

Usage

: [indx, indy, dist] = gsp_nn_distanz( X1 );
[indx, indy, dist] = gsp_nn_distanz( X1, X2 );
[indx, indy, dist] = gsp_nn_distanz( X1, X2, param );
[indx, indy, dist, Xo1, Xo2, epsilon] = gsp_nn_distanz(...)

Input parameters

X1 Input points 1
X2 Input points 2
param Structure of optional parameters

Output parameters

indx Indices over x
indy Indices over y
dist Distances
Xo1 Points 1 after rescaling
Xo2 Points 2 after rescaling
epsilon Radius of the ball (if the ball is used!)
NN Indices of closest neighbours of each node
Dist Sorted distances for each node

Description

This function computes the nearest neighboors of Xin.

Additional parameters

  • param.type : ['knn', 'radius'] - the type of graph (default 'knn')
  • param.use_flann : [0, 1] - use the FLANN library (default 0)
  • param.use_full : [0, 1] - Compute the full distance matrix and then sparsify it (default 0)
  • param.flan_checks: int - Number of checks for FLANN (default 256) the higher the more precise, but the slower. Please consider the following values: a) 32 not precise and fast, b) precise enought and still fast, c) 4096 precise and may be slow.
  • param.nb_cores : int - Number of cores for FLANN (default 1)
  • param.center : [0, 1] - center the data
  • param.rescale : [0, 1] - rescale the data (in a 1-ball)
  • param.sigma : float - the variance of the distance kernel
  • param.k : int - number of neighbors for knn
  • param.epsilon : float - the radius for the range search
  • param.use_l1 : [0, 1] - use the l1 distance