Skip to content

VpTree does not accept float in knncolle #18

@shrit

Description

@shrit

Hi Aaron,

It seems that VpTree does not accept float value as the std::tuple is hard coded to double.

Here is the code:

https://github.com/LTLA/knncolle/blob/3ad6b8cdbd281d78c77390d5a6ded4513bdf3860/include/knncolle/VpTree/VpTree.hpp#L76

Here is the error when trying to use float for Umap:

/./knncolle/VpTree/VpTree.hpp:150:29: error: no matching function for call to ‘std::tuple<int, const double*, double>::tuple(int&, const float*, int)’
  150 |             items.push_back(DataPoint(i, vals + i * num_dim, 0));

It seems that const INTERNAL_t*, is not being propagated correctly from umap, and it is using the default value causing the above error.

I know this is belong to the knn repo, but it is here when the error is happening.

Any easy solution ?

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions