Initial release #1

Merged
warrence merged 102 commits from dev into main 2026-06-30 10:26:52 +02:00
Showing only changes of commit 0826e140b8 - Show all commits
+4 -1
View File
@@ -24,7 +24,6 @@ pub struct Graph {
pub incidence_vertices: Vec<Vertex>,
}
// TODO: Add iterator of vertices.
// TODO: Add iterator of edges.
// TODO: Add iterator of vertex neighbors, see 'fn add_adjacent()'.
impl Graph {
@@ -87,6 +86,10 @@ impl Graph {
self.incidence_headers[v1.0].first_incidence =
Some(Incidence(self.incidence_vertices.len() - 1));
}
pub fn iter(&self) -> impl Iterator<Item = Vertex> {
(0..self.incidence_headers.len()).map(Vertex)
}
}
#[cfg(test)]