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

Class CacheNodeBuilder

src/graph/cache/cache_node_builder.h:21–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace embedx {
20
21class CacheNodeBuilder {
22 private:
23 vec_int_t nodes_;
24 const InMemoryGraph* graph_;
25 double cache_thld_;
26 std::mutex mtx_;
27
28 public:
29 static std::unique_ptr<CacheNodeBuilder> Create(const InMemoryGraph* graph,
30 int cache_type,
31 double cache_thld,
32 int thread_num);
33
34 public:
35 const vec_int_t* nodes() const noexcept { return &nodes_; }
36
37 private:
38 bool Build(const InMemoryGraph* graph, int cache_type, double cache_thld,
39 int thread_num);
40 bool RandomCache(const vec_int_t& nodes, int thread_id);
41 bool DegreeCache(const vec_int_t& nodes, int thread_id);
42 bool ImportanceCache(const vec_int_t& nodes, int thread_id);
43
44 private:
45 CacheNodeBuilder() = default;
46};
47
48} // namespace embedx

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected