MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / addNeighbors

Function addNeighbors

src/algorithms/all_paths.c:142–164  ·  view source on GitHub ↗

Traverse from the frontier node in the specified direction and add all encountered nodes and edges.

Source from the content-addressed store, hash-verified

140
141// Traverse from the frontier node in the specified direction and add all encountered nodes and edges.
142void addNeighbors
143(
144 AllPathsCtx *ctx,
145 LevelConnection *frontier,
146 uint32_t depth,
147 GRAPH_EDGE_DIR dir
148) {
149 switch(dir) {
150 case GRAPH_EDGE_DIR_OUTGOING:
151 addOutgoingNeighbors(ctx, frontier, depth);
152 break;
153 case GRAPH_EDGE_DIR_INCOMING:
154 addIncomingNeighbors(ctx, frontier, depth);
155 break;
156 case GRAPH_EDGE_DIR_BOTH:
157 addIncomingNeighbors(ctx, frontier, depth);
158 addOutgoingNeighbors(ctx, frontier, depth);
159 break;
160 default:
161 ASSERT(false && "encountered unexpected traversal direction in AllPaths");
162 break;
163 }
164}
165
166AllPathsCtx *AllPathsCtx_New
167(

Callers 3

_AllPathsCtx_NextPathFunction · 0.70

Calls 2

addOutgoingNeighborsFunction · 0.70
addIncomingNeighborsFunction · 0.70

Tested by 2