Nothing
#' @export
#' @importFrom Matrix t
buildHnsw <- function(X, transposed=FALSE, nlinks=16, ef.construction=200, directory=tempdir(), ef.search=10,
fname=tempfile(tmpdir=directory, fileext=".idx"), distance=c("Euclidean", "Manhattan"))
# Builds an Hnsw index at the specified path.
#
# written by Aaron Lun
# created 25 September 2018
{
if (transposed) {
tX <- X
} else {
tX <- t(X)
}
if (!is.matrix(tX)) {
tX <- as.matrix(tX)
}
distance <- match.arg(distance)
build_hnsw(tX, nlinks, ef.construction, fname, distance)
HnswIndex(data=tX, path=fname, ef.search=ef.search, NAMES=colnames(tX), distance=distance)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.