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

Function runOneIteration

src/function/gds/gds_utils.cpp:60–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static void runOneIteration(ExecutionContext* context, Graph* graph,
61 ExtendDirection extendDirection, const GDSComputeState& compState,
62 const std::vector<std::string>& propertiesToScan) {
63 for (auto info : graph->getGraphEntry()->nodeInfos) {
64 for (const auto& relInfo : graph->getRelInfos(info.entry->getTableID())) {
65 if (context->clientContext->interrupted()) {
66 throw InterruptException{};
67 }
68 switch (extendDirection) {
69 case ExtendDirection::FWD: {
70 scheduleFrontierTask(context, relInfo, graph, ExtendDirection::FWD, compState,
71 propertiesToScan);
72 } break;
73 case ExtendDirection::BWD: {
74 scheduleFrontierTask(context, relInfo, graph, ExtendDirection::BWD, compState,
75 propertiesToScan);
76 } break;
77 case ExtendDirection::BOTH: {
78 scheduleFrontierTask(context, relInfo, graph, ExtendDirection::FWD, compState,
79 propertiesToScan);
80 scheduleFrontierTask(context, relInfo, graph, ExtendDirection::BWD, compState,
81 propertiesToScan);
82 } break;
83 default:
84 UNREACHABLE_CODE;
85 }
86 }
87 }
88}
89
90void GDSUtils::runAlgorithmEdgeCompute(ExecutionContext* context, GDSComputeState& compState,
91 Graph* graph, ExtendDirection extendDirection, uint64_t maxIteration) {

Callers 3

runFTSEdgeComputeMethod · 0.85

Calls 3

scheduleFrontierTaskFunction · 0.85
getGraphEntryMethod · 0.80
getRelInfosMethod · 0.45

Tested by

no test coverage detected