* Check if a vertex matches the target criteria.
(
vertex: Vertex<any, any>,
targetId: ElementId | undefined,
targetCondition: Condition | undefined,
)
| 5332 | * Check if a vertex matches the target criteria. |
| 5333 | */ |
| 5334 | private isTarget( |
| 5335 | vertex: Vertex<any, any>, |
| 5336 | targetId: ElementId | undefined, |
| 5337 | targetCondition: Condition | undefined, |
| 5338 | ): boolean { |
| 5339 | if (targetId !== undefined) { |
| 5340 | return vertex.id === targetId; |
| 5341 | } |
| 5342 | |
| 5343 | if (targetCondition !== undefined) { |
| 5344 | // Create a temporary path to evaluate the condition |
| 5345 | const tempPath = new TraversalPath(undefined, vertex, []); |
| 5346 | return evaluateConditionFn(tempPath, targetCondition); |
| 5347 | } |
| 5348 | |
| 5349 | return false; |
| 5350 | } |
| 5351 | |
| 5352 | public override clone(partial?: Partial<ShortestPathStepConfig>) { |
| 5353 | const { config } = this; |
no test coverage detected