(
&self,
meeting: u32,
fwd_parent: &HashMap<u32, u32>,
bwd_parent: &HashMap<u32, u32>,
)
| 260 | } |
| 261 | |
| 262 | fn reconstruct_path( |
| 263 | &self, |
| 264 | meeting: u32, |
| 265 | fwd_parent: &HashMap<u32, u32>, |
| 266 | bwd_parent: &HashMap<u32, u32>, |
| 267 | ) -> Vec<String> { |
| 268 | let mut fwd_path = Vec::new(); |
| 269 | let mut current = meeting; |
| 270 | loop { |
| 271 | fwd_path.push(current); |
| 272 | let parent = fwd_parent[¤t]; |
| 273 | if parent == current { |
| 274 | break; |
| 275 | } |
| 276 | current = parent; |
| 277 | } |
| 278 | fwd_path.reverse(); |
| 279 | |
| 280 | current = bwd_parent[&meeting]; |
| 281 | if current != meeting { |
| 282 | loop { |
| 283 | fwd_path.push(current); |
| 284 | let parent = bwd_parent[¤t]; |
| 285 | if parent == current { |
| 286 | break; |
| 287 | } |
| 288 | current = parent; |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | fwd_path |
| 293 | .into_iter() |
| 294 | .map(|id| self.id_to_node[id as usize].clone()) |
| 295 | .collect() |
| 296 | } |
| 297 | |
| 298 | /// Materialize a subgraph as edge tuples within max_depth. |
| 299 | /// |
no test coverage detected