Check if any nodes with index in `target_idx` can be reached from `src_idx` node. Parameters ---------- src_idx : int Index of source node. target_idx : Set[int] Indexes of target nodes. Returns ------- bool
(self, src_idx: int, target_idx: Set[int])
| 225 | return ordered |
| 226 | |
| 227 | def is_reachable(self, src_idx: int, target_idx: Set[int]) -> bool: |
| 228 | """Check if any nodes with index in `target_idx` can be reached from `src_idx` node. |
| 229 | |
| 230 | Parameters |
| 231 | ---------- |
| 232 | src_idx : int |
| 233 | Index of source node. |
| 234 | target_idx : Set[int] |
| 235 | Indexes of target nodes. |
| 236 | |
| 237 | Returns |
| 238 | ------- |
| 239 | bool |
| 240 | True if any node in `target_idx` is reachable from source node. |
| 241 | """ |
| 242 | if self.get_reachable(target_idx, src_idx): |
| 243 | return True |
| 244 | return False |
| 245 | |
| 246 | def get_reachable( |
| 247 | self, target_idx: Set[int], start_at: Optional[int] = None |
nothing calls this directly
no test coverage detected