Add comments for AppendGraph and Graph add_incidence()

This commit is contained in:
2026-04-28 17:35:00 +02:00
parent 0ae4d486cb
commit f075501828
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -54,6 +54,8 @@ impl Graph {
}
}
// Adds a single incidence of an edge, which is composed by two such incidences, to the
// incidences arena, and returns its index.
fn add_incidence(&mut self, v1: Vertex, v2: Vertex) -> Edge {
let edge = self.incidences.insert(IncidenceEntry {
next: self.vertices[v1].first_incidence.take(),