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

Function addNeighbors

src/procedures/proc_sp_paths.c:390–412  ·  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

388
389// traverse from the frontier node in the specified direction and add all encountered nodes and edges.
390static void addNeighbors
391(
392 SinglePairCtx *ctx,
393 LevelConnection *frontier,
394 uint32_t depth,
395 GRAPH_EDGE_DIR dir
396) {
397 switch(dir) {
398 case GRAPH_EDGE_DIR_OUTGOING:
399 addOutgoingNeighbors(ctx, frontier, depth);
400 break;
401 case GRAPH_EDGE_DIR_INCOMING:
402 addIncomingNeighbors(ctx, frontier, depth);
403 break;
404 case GRAPH_EDGE_DIR_BOTH:
405 addIncomingNeighbors(ctx, frontier, depth);
406 addOutgoingNeighbors(ctx, frontier, depth);
407 break;
408 default:
409 ASSERT(false && "encountered unexpected traversal direction in AllPaths");
410 break;
411 }
412}
413
414// get numeric attribute value of an entity otherwise return default value
415static inline SIValue _get_value_or_defualt

Callers 1

SPpaths_nextFunction · 0.70

Calls 2

addOutgoingNeighborsFunction · 0.70
addIncomingNeighborsFunction · 0.70

Tested by

no test coverage detected