MCPcopy Create free account
hub / github.com/antgroup/vsag / CalcDistanceById

Method CalcDistanceById

src/algorithm/hgraph.cpp:1518–1532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1516}
1517
1518float
1519HGraph::CalcDistanceById(const float* query, int64_t id) const {
1520 FlattenInterfacePtr flat;
1521 {
1522 std::shared_lock shared_lock(this->global_mutex_);
1523 flat = this->basic_flatten_codes_;
1524 if (use_reorder_) {
1525 flat = this->high_precise_codes_;
1526 }
1527 if (create_new_raw_vector_) {
1528 flat = this->raw_vector_;
1529 }
1530 }
1531 return InnerIndexInterface::calc_distance_by_id(query, id, flat);
1532}
1533
1534DatasetPtr
1535HGraph::CalDistanceById(const float* query, const int64_t* ids, int64_t count) const {

Callers 1

UpdateVectorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected