| 15 | class IvfIndex { |
| 16 | public: |
| 17 | IvfIndex( |
| 18 | size_t dim, |
| 19 | size_t max_elements, |
| 20 | size_t num_clusters, |
| 21 | size_t nbits, |
| 22 | const std::string& metric = "l2" |
| 23 | ) |
| 24 | : dim_(dim) |
| 25 | , max_elements_(max_elements) |
| 26 | , num_clusters_(num_clusters) |
| 27 | , nbits_(nbits) |
| 28 | , metric_(metric_from_string(metric)) |
| 29 | , index_(std::make_unique<rabitqlib::ivf::IVF>( |
| 30 | max_elements, |
| 31 | dim, |
| 32 | num_clusters, |
| 33 | nbits, |
| 34 | metric_, |
| 35 | rabitqlib::RotatorType::FhtKacRotator |
| 36 | )) {} |
| 37 | |
| 38 | void build( |
| 39 | py::handle data, |
nothing calls this directly
no test coverage detected