MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / switchToDense

Method switchToDense

src/function/gds/bfs_graph.cpp:261–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void BFSGraphManager::switchToDense(ExecutionContext* context, Graph* graph) {
262 DASSERT(state == GDSDensityState::SPARSE);
263 state = GDSDensityState::DENSE;
264 denseBFSGraph->init(context, graph);
265 denseBFSGraph->blocks = std::move(sparseBFSGraph->blocks);
266 for (auto& [tableID, map] : sparseBFSGraph->sparseObjects.getData()) {
267 denseBFSGraph->pinTableID(tableID);
268 for (auto& [offset, ptr] : map) {
269 denseBFSGraph->setParentList(offset, ptr);
270 }
271 }
272 curGraph = denseBFSGraph.get();
273}
274
275} // namespace function
276} // namespace lbug

Callers 1

Calls 5

setParentListMethod · 0.80
initMethod · 0.45
getDataMethod · 0.45
pinTableIDMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected