diff --git a/src/models/append_graph.rs b/src/models/append_graph.rs index 2423463..7868ae7 100644 --- a/src/models/append_graph.rs +++ b/src/models/append_graph.rs @@ -52,6 +52,8 @@ impl AppendGraph { } } + // Adds a single incidence of an edge, which is composed by two such incidences, to the + // incidences vector. fn add_incidence(&mut self, v1: Vertex, v2: Vertex) { self.incidences.push(IncidenceEntry { next: self.vertices[v1.0].first_incidence.take(), diff --git a/src/models/graph.rs b/src/models/graph.rs index 2ce0f8d..88e34a3 100644 --- a/src/models/graph.rs +++ b/src/models/graph.rs @@ -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(),