: G = gsp_nn_graph( Xin ); G = gsp_nn_graph( Xin, param );
| Xin | Input points |
| param | Structure of optional parameters |
| G | Resulting graph |
'gsp_nn_graph( Xin, param )' creates a graph from positional data. The points are connected to their neighbors (either belonging to the k nearest neighbors or to the epsilon-closest neighbors.
Example:
P = gsp_pointcloud('bunny');
param.type = 'knn';
G = gsp_nn_graph(double(P), param);
gsp_plot_graph(G);