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

Function SinglePairCtx_New

src/procedures/proc_sp_paths.c:153–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

validate_configFunction · 0.85

Calls 3

Path_NewFunction · 0.85

Tested by

no test coverage detected