MCPcopy Create free account
hub / github.com/Tencent/embedx / AddFeature

Method AddFeature

src/io/storage/adj_matrix_impl.cc:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 bool AddFeature(AdjValue* value) override {
85 if (src_indexing_.Find(value->node)) {
86 DXERROR(
87 "Need unique node in the feature file, got duplicate node: %" PRIu64,
88 value->node);
89 return false;
90 }
91
92 src_indexing_.Add(value->node);
93 adj_matrix_.emplace_back(value->pairs);
94
95 return true;
96 }
97
98 const vec_pair_t* FindNeighbor(int_t node) const override {
99 int src_index = src_indexing_.Get(node);

Callers

nothing calls this directly

Calls 2

FindMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected