Iterate over all vertices.
(&self)
| 338 | |
| 339 | /// Iterate over all vertices. |
| 340 | pub fn iter_vertices(&self) -> impl Iterator<Item = (VertexId, &AliveVertex)> { |
| 341 | self.vertices |
| 342 | .iter() |
| 343 | .enumerate() |
| 344 | .map(|(i, v)| (VertexId::new(i), v)) |
| 345 | } |
| 346 | |
| 347 | /// Iterate over all vertices mutably. |
| 348 | pub fn iter_vertices_mut(&mut self) -> impl Iterator<Item = (VertexId, &mut AliveVertex)> { |