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

Method Build

src/algorithm/pyramid.cpp:78–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void
79IndexNode::Build(ODescent& odescent) {
80 std::unique_lock lock(mutex_);
81 // Build an index when the level corresponding to the current node requires indexing
82 if (not ids_.empty()) {
83 Init();
84 }
85 if (status_ == Status::GRAPH) {
86 entry_point_ = ids_[0];
87 odescent.SetMaxDegree(static_cast<int32_t>(graph_param_->max_degree_));
88 odescent.Build(ids_);
89 odescent.SaveGraph(graph_);
90 Vector<InnerIdType>(allocator_).swap(ids_);
91 }
92 for (const auto& item : children_) {
93 item.second->Build(odescent);
94 }
95}
96
97void
98IndexNode::AddChild(const std::string& key) {

Callers 1

build_by_odescentMethod · 0.45

Calls 13

TrainMethod · 0.95
AddMethod · 0.95
build_by_odescentMethod · 0.95
splitFunction · 0.85
SetMaxDegreeMethod · 0.80
SaveGraphMethod · 0.80
GetPathsMethod · 0.80
GetChildMethod · 0.80
emptyMethod · 0.45
swapMethod · 0.45
GetNumElementsMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected