Get all incoming edges to a node
(&self, node_id: &str)
| 230 | |
| 231 | /// Get all incoming edges to a node |
| 232 | pub fn get_incoming_edges(&self, node_id: &str) -> Vec<&Edge> { |
| 233 | self.adjacency_in |
| 234 | .get(node_id) |
| 235 | .map(|edge_ids| { |
| 236 | edge_ids |
| 237 | .iter() |
| 238 | .filter_map(|id| self.edges.get(id)) |
| 239 | .collect() |
| 240 | }) |
| 241 | .unwrap_or_default() |
| 242 | } |
| 243 | |
| 244 | /// Get all edges connected to a node (both incoming and outgoing) |
| 245 | pub fn get_connected_edges(&self, node_id: &str) -> Vec<&Edge> { |
no test coverage detected