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 58f330ef46 - Show all commits
+4 -3
View File
@@ -33,16 +33,17 @@ impl Graph {
// TODO: 'fn are_adjacent()' could probably be done with a neighbor vertex iterator. // TODO: 'fn are_adjacent()' could probably be done with a neighbor vertex iterator.
fn are_adjacent(&self, v1: Vertex, v2: Vertex) -> bool { fn are_adjacent(&self, v1: Vertex, v2: Vertex) -> bool {
let Some(next) = self.vertex_incidence_headers[v1.0].first_incidence else { let Some(mut incidence) = self.vertex_incidence_headers[v1.0].first_incidence else {
return false; return false;
}; };
loop { loop {
if self.incidence_vertices[next.0] == v2 { if self.incidence_vertices[incidence.0] == v2 {
return true; return true;
} }
let Some(next) = self.next_incidences[next.0] else { let Some(next) = self.next_incidences[incidence.0] else {
return false; return false;
}; };
incidence = next;
} }
} }