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

Method BatchQuery

include/rabitqlib/index/query.hpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 T G_k1xSumq_ = 0; // G_k1xSumq
24 MetricType metric_type_;
25
26 public:
27 explicit BatchQuery(
28 const T* rotated_query, size_t padded_dim, MetricType metric_type = METRIC_L2
29 )
30 : lookup_table_(rotated_query, padded_dim), metric_type_(metric_type) {
31 float c_1 = -((1 << 1) - 1) / 2.F;
32
33 T sumq =
34 std::accumulate(rotated_query, rotated_query + padded_dim, static_cast<T>(0));
35
36 G_k1xSumq_ = sumq * c_1;
37 }

Callers

nothing calls this directly

Calls 1

accumulateFunction · 0.85

Tested by

no test coverage detected