unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
1.92k stars 109 forks source link

Docs: The usearch.h exact_search documentation doesn't match the function arguments #434

Open MarkReedZ opened 1 month ago

MarkReedZ commented 1 month ago

Describe the bug

The usearch.h exact_search documentation doesn't match the function arguments

/**
 *  @brief Multi-threaded exact nearest neighbors search for equi-dimensional vectors.
 *  @param[in] dataset Pointer to the first scalar of the dataset matrix.
 *  @param[in] queries Pointer to the first scalar of the queries matrix.
 *  @param[in] dataset_size Number of vectors in the `dataset`.
 *  @param[in] queries_size Number of vectors in the `queries` set.
 *  @param[in] dataset_stride Number of bytes between starts of consecutive vectors in `dataset`.
 *  @param[in] queries_stride Number of bytes between starts of consecutive vectors in `queries`.
 *  @param[in] scalar_kind The scalar type used in the vectors.
 *  @param[in] dimensions The number of dimensions in each vector.
 *  @param[in] metric_kind The metric kind used for distance calculation between vectors.
 *  @param[in] count Upper bound on the number of neighbors to search, the "k" in "kANN".
 *  @param[in] threads Upper bound for the number of CPU threads to use.
 *  @param[out] keys Output buffer for up to `count` nearest neighbors keys.
 *  @param[out] distances Output buffer for up to `count` distances to nearest neighbors.
 *  @param[out] error Pointer to a string where the error message will be stored, if an error occurs.
 *  @return Number of found matches.
 */
USEARCH_EXPORT void usearch_exact_search(                            //
    void const* dataset, size_t dataset_size, size_t dataset_stride, //
    void const* queries, size_t queries_size, size_t queries_stride, //
    usearch_scalar_kind_t scalar_kind, size_t dimensions,            //
    usearch_metric_kind_t metric_kind, size_t count, size_t threads, //
    usearch_key_t* keys, size_t keys_stride,                         //
    usearch_distance_t* distances, size_t distances_stride,          //
    usearch_error_t* error);

Steps to reproduce

-

Expected behavior

-

USearch version

main-dev

Operating System

Ubuntu 24

Hardware architecture

x86

Which interface are you using?

C++ implementation

Contact Details

No response

Are you open to being tagged as a contributor?

Is there an existing issue for this?

Code of Conduct

MarkReedZ commented 1 month ago

Under python/ index.search has an unused and undocumented argument radius

def search(
        self,
        vectors: VectorOrVectorsLike,
        count: int = 10,
        radius: float = math.inf,
ashvardanian commented 1 month ago

Yes, @MarkReedZ, it has :) I was just discussing it with someone on a phone. Will think about implementing it in the engine 🤗