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

Method Build

src/graph/in_memory_graph.cc:21–43  ·  view source on GitHub ↗

/ Build graph */ /

Source from the content-addressed store, hash-verified

19/* Build graph */
20/************************************************************************/
21bool InMemoryGraph::Build(const GraphConfig& config) {
22 DXINFO("Build in memory graph...");
23
24 graph_builder_ = GraphBuilder::Create(config);
25 if (!graph_builder_) {
26 return false;
27 }
28
29 post_builder_ =
30 PostBuilder::Create(graph_builder_->context_storage(), config);
31 if (!post_builder_) {
32 return false;
33 }
34
35 if (!CheckSizeValid()) {
36 return false;
37 }
38
39 PrintGraphTopo();
40
41 DXINFO("Done.");
42 return true;
43}
44
45bool InMemoryGraph::CheckSizeValid() const {
46 // len(node_feat_list) <= len(context_list)

Callers 1

CreateMethod · 0.45

Calls 1

context_storageMethod · 0.80

Tested by

no test coverage detected