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

Method build

python_bindings/symqg_bindings.cpp:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace py = pybind11;
24
25namespace rabitqlib::python_bindings {
26
27class SymqgIndex {
28 public:
29 SymqgIndex(
30 size_t dim,
31 size_t max_degree,
32 const std::string& metric = "l2",
33 size_t quantization_bits = 0
34 )
35 : dim_(dim)
36 , max_degree_(max_degree)
37 , metric_(metric_from_string(metric))
38 , quantization_bits_(quantization_bits) {
39 if (max_degree == 0 || max_degree % rabitqlib::fastscan::kBatchSize != 0) {
40 throw std::invalid_argument("max_degree must be a positive multiple of 32");
41 }

Callers 1

mainFunction · 0.95

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected