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

Method getNextNbrSubgraphs

src/binder/query/query_graph.cpp:144–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144subquery_graph_set_t SubqueryGraph::getNextNbrSubgraphs(const SubqueryGraph& prevNbr) const {
145 subquery_graph_set_t result;
146 for (auto& nodePos : prevNbr.getNodeNbrPositions()) {
147 if (queryNodesSelector[nodePos]) {
148 continue;
149 }
150 auto nbr = prevNbr;
151 nbr.addQueryNode(nodePos);
152 result.insert(nbr);
153 }
154 for (auto& relPos : prevNbr.getRelNbrPositions()) {
155 if (queryRelsSelector[relPos]) {
156 continue;
157 }
158 auto nbr = prevNbr;
159 nbr.addQueryRel(relPos);
160 result.insert(nbr);
161 }
162 return result;
163}
164
165bool QueryGraph::isEmpty() const {
166 for (auto& n : queryNodes) {

Callers

nothing calls this directly

Calls 5

getNodeNbrPositionsMethod · 0.80
getRelNbrPositionsMethod · 0.80
addQueryNodeMethod · 0.45
insertMethod · 0.45
addQueryRelMethod · 0.45

Tested by

no test coverage detected