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

Method edgeCompute

src/function/gds/awsp_paths.cpp:26–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 }
25
26 std::vector<nodeID_t> edgeCompute(nodeID_t boundNodeID, graph::NbrScanState::Chunk& chunk,
27 bool fwdEdge) override {
28 std::vector<nodeID_t> result;
29 chunk.forEach([&](auto neighbors, auto propertyVectors, auto i) {
30 auto nbrNodeID = neighbors[i];
31 auto edgeID = propertyVectors[0]->template getValue<relID_t>(i);
32 auto weight = propertyVectors[1]->template getValue<T>(i);
33 WeightUtils::checkWeight(AllWeightedSPPathsFunction::name, weight);
34 if (!block->hasSpace()) {
35 block = bfsGraphManager->getCurrentGraph()->addNewBlock();
36 }
37 if (bfsGraphManager->getCurrentGraph()->tryAddParentWithWeight(boundNodeID, edgeID,
38 nbrNodeID, fwdEdge, static_cast<double>(weight), block)) {
39 result.push_back(nbrNodeID);
40 }
41 });
42 return result;
43 }
44
45 std::unique_ptr<EdgeCompute> copy() override {
46 return std::make_unique<AWSPPathsEdgeCompute<T>>(bfsGraphManager);

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected