Iterate over all vertices mutably.
(&mut self)
| 346 | |
| 347 | /// Iterate over all vertices mutably. |
| 348 | pub fn iter_vertices_mut(&mut self) -> impl Iterator<Item = (VertexId, &mut AliveVertex)> { |
| 349 | self.vertices |
| 350 | .iter_mut() |
| 351 | .enumerate() |
| 352 | .map(|(i, v)| (VertexId::new(i), v)) |
| 353 | } |
| 354 | |
| 355 | /// Get statistics about this graph. |
| 356 | pub fn stats(&self) -> GraphStats { |