| 303 | } |
| 304 | |
| 305 | void GraphStore::BuildLocalCount() { |
| 306 | local_count_.reserve(e_types_.size() + n_types_.size()); |
| 307 | for (auto it = e_types_.begin(); it != e_types_.end(); ++it) { |
| 308 | Graph* graph = graphs_->LookupOrCreate(it->first); |
| 309 | ::graphlearn::io::GraphStorage* storage = graph->GetLocalStorage(); |
| 310 | local_count_.push_back(storage->GetEdgeCount() * it->second); |
| 311 | } |
| 312 | for (auto it = n_types_.begin(); it != n_types_.end(); ++it) { |
| 313 | Noder* noder = noders_->LookupOrCreate(it->first); |
| 314 | ::graphlearn::io::NodeStorage* storage = noder->GetLocalStorage(); |
| 315 | local_count_.push_back(storage->GetIds().Size() * it->second); |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | Graph* GraphStore::GetGraph(const std::string& edge_type) { |
| 320 | return graphs_->LookupOrCreate(edge_type); |
nothing calls this directly
no test coverage detected