Main nearest neighbour calculation function. Used on the first reference dataset. Returns a list of three objects: 1) the cell indices of the w nearest neighbours 2) the corresponding approx. cosine similarities

1 | ```
NN(w, k, subcentroids, subclusters, query_chunks, M, SqNorm)
``` |

`w` |
An integer specifying the number of nearest neighbours |

`k` |
An integer specifying the number of subcentroids for each product quantization chunk |

`subcentroids` |
A list of matrices containing the subcentroids of each chunk. |

`subclusters` |
A matrix containing the subcentroid assignments of each reference cell. See scf_index. |

`query_chunks` |
A list of matrices containing the chunks of the query dataset after it has been split according to the product quantization method |

`M` |
An integer specifying the number of chunks |

`SqNorm` |
A numerical vector containing the Euclidean Squared Norm of each query cell. |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.