Function faiss_sys::faiss_Index_assign [] [src]

pub unsafe extern "C" fn faiss_Index_assign(
    index: *mut FaissIndex,
    n: idx_t,
    x: *const f32,
    labels: *mut idx_t,
    k: idx_t
) -> c_int

return the indexes of the k vectors closest to the query x.

This function is identical as search but only return labels of neighbors. @param index opaque pointer to index object @param x input vectors to search, size n * d @param labels output labels of the NNs, size n*k