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

Method CheckSizeValid

src/graph/in_memory_graph.cc:45–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool InMemoryGraph::CheckSizeValid() const {
46 // len(node_feat_list) <= len(context_list)
47 if (!node_feature_empty()) {
48 if (node_feature_size() > node_size()) {
49 DXERROR(
50 "Need node_feature.size() <= node_graph.size(), got "
51 "node_feature.size(): %zu vs node_graph.size(): %zu.",
52 node_feature_size(), node_size());
53 return false;
54 }
55 }
56
57 // len(neigh_feat_list) <= len(context_list)
58 if (!neigh_feature_empty()) {
59 if (neigh_feature_size() > node_size()) {
60 DXERROR(
61 "Need neighbor_feature.size() <= node_graph.size(), got "
62 "neighbor_feature.size(): %zu vs node_graph.size(): %zu.",
63 neigh_feature_size(), node_size());
64 return false;
65 }
66 }
67
68 return true;
69}
70
71void InMemoryGraph::PrintGraphTopo() const {
72 for (const auto& entry : id_name_map()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected