MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / PYBIND11_MODULE

Function PYBIND11_MODULE

python_bindings/rabitq_bindings.cpp:13–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11void register_ivf(py::module_& m);
12void register_symqg(py::module_& m);
13void register_kmeans(py::module_& m);
14
15PYBIND11_MODULE(_rabitqlib, m) {
16 m.doc() = "RabitQ Python bindings combined module";
17
18 // Register shared enums once
19 py::enum_<rabitqlib::MetricType>(m, "MetricType")
20 .value("L2", rabitqlib::METRIC_L2)
21 .value("IP", rabitqlib::METRIC_IP)
22 .export_values();
23
24 py::enum_<rabitqlib::RotatorType>(m, "RotatorType")
25 .value("FhtKacRotator", rabitqlib::RotatorType::FhtKacRotator)
26 .value("MatrixRotator", rabitqlib::RotatorType::MatrixRotator)
27 .export_values();
28
29 // Register each index's bindings into the same module
30 register_hnsw(m);
31 register_ivf(m);
32 register_symqg(m);
33 register_kmeans(m);
34}

Callers

nothing calls this directly

Calls 4

register_hnswFunction · 0.85
register_ivfFunction · 0.85
register_symqgFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected