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

Method edgeCompute

src/function/gds/ssp_paths.cpp:23–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 }
22
23 std::vector<nodeID_t> edgeCompute(nodeID_t boundNodeID, graph::NbrScanState::Chunk& resultChunk,
24 bool isFwd) override {
25 std::vector<nodeID_t> activeNodes;
26 resultChunk.forEach([&](auto neighbors, auto propertyVectors, auto i) {
27 auto nbrNodeID = neighbors[i];
28 auto iter = frontierPair->getNextFrontierValue(nbrNodeID.offset);
29 if (iter == FRONTIER_UNVISITED) {
30 if (!block->hasSpace()) {
31 block = bfsGraphManager->getCurrentGraph()->addNewBlock();
32 }
33 auto edgeID = propertyVectors[0]->template getValue<nodeID_t>(i);
34 bfsGraphManager->getCurrentGraph()->addSingleParent(frontierPair->getCurrentIter(),
35 boundNodeID, edgeID, nbrNodeID, isFwd, block);
36 activeNodes.push_back(nbrNodeID);
37 }
38 });
39 return activeNodes;
40 }
41
42 std::unique_ptr<EdgeCompute> copy() override {
43 return std::make_unique<SSPPathsEdgeCompute>(frontierPair, bfsGraphManager);

Callers 2

runMethod · 0.45
runSparseMethod · 0.45

Calls 7

getNextFrontierValueMethod · 0.80
hasSpaceMethod · 0.80
addNewBlockMethod · 0.80
getCurrentGraphMethod · 0.80
addSingleParentMethod · 0.80
forEachMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected