| 149 | } |
| 150 | |
| 151 | static 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 |
no test coverage detected