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

Function addNeighbors

src/procedures/proc_ss_paths.c:385–407  ·  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

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

Callers 1

SSpaths_nextFunction · 0.70

Calls 2

addOutgoingNeighborsFunction · 0.70
addIncomingNeighborsFunction · 0.70

Tested by

no test coverage detected