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

Function SingleSourceCtx_New

src/procedures/proc_ss_paths.c:151–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static void SingleSourceCtx_New
152(
153 SingleSourceCtx *ctx,
154 Node *src,
155 Graph *g,
156 int *relationIDs,
157 int relationCount,
158 GRAPH_EDGE_DIR dir,
159 uint minLen,
160 uint maxLen
161) {
162 ASSERT(src != NULL);
163
164 ctx->g = g;
165 ctx->dir = dir;
166 ctx->minLen = minLen + 1;
167 ctx->maxLen = maxLen + 1;
168 ctx->relationIDs = relationIDs;
169 ctx->relationCount = relationCount;
170 ctx->levels = array_new(LevelConnection *, 1);
171 ctx->path = Path_New(1);
172 ctx->neighbors = array_new(Edge, 32);
173
174 _SingleSourceCtx_EnsureLevelArrayCap(ctx, 0, 1);
175 _SingleSourceCtx_AddConnectionToLevel(ctx, 0, src, NULL);
176}
177
178
179// validate config map and initialize SingleSourceCtx

Callers 1

validate_configFunction · 0.85

Calls 3

Path_NewFunction · 0.85

Tested by

no test coverage detected