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

Method Build

src/algorithm/hgraph.cpp:119–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119std::vector<int64_t>
120HGraph::Build(const DatasetPtr& data) {
121 CHECK_ARGUMENT(GetNumElements() == 0, "index is not empty");
122 this->Train(data);
123 std::vector<int64_t> ret;
124 if (graph_type_ == GRAPH_TYPE_VALUE_NSW) {
125 ret = this->Add(data);
126 } else {
127 ret = this->build_by_odescent(data);
128 }
129 if (use_elp_optimizer_) {
130 elp_optimize();
131 }
132 return ret;
133}
134
135JsonType
136HGraph::map_hgraph_param(const JsonType& hgraph_json) {

Callers 2

build_by_odescentMethod · 0.45
MergeMethod · 0.45

Calls 3

TrainMethod · 0.95
AddMethod · 0.95
build_by_odescentMethod · 0.95

Tested by

no test coverage detected