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

Method get_location

src/algorithm/ivf.cpp:544–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544std::pair<BucketIdType, InnerIdType>
545IVF::get_location(InnerIdType inner_id) const {
546 auto loc = this->location_map_[inner_id];
547 constexpr uint64_t mask = (1ULL << LOCATION_SPLIT_BIT) - 1ULL;
548 auto bucket_id = static_cast<BucketIdType>(loc >> LOCATION_SPLIT_BIT);
549 auto offset_id = static_cast<InnerIdType>(loc & mask);
550 return {bucket_id, offset_id};
551}
552
553void
554IVF::UpdateAttribute(int64_t id, const AttributeSet& new_attrs) {

Callers 6

GetCodeByInnerIdMethod · 0.95
UpdateAttributeMethod · 0.95
CalDistanceByIdMethod · 0.95
CalcDistanceByIdMethod · 0.95
GetVectorByInnerIdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected