Move edge_count() in method order

This commit is contained in:
2026-05-07 11:38:15 +02:00
parent 016cece626
commit e074fdf944
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -80,10 +80,6 @@ impl GraphTopology for AppendGraph {
self.vertices.len()
}
fn edge_count(&self) -> usize {
self.incidences.len() / 2
}
fn vertex_capacity(&self) -> usize {
self.vertices.len()
}
@@ -92,6 +88,10 @@ impl GraphTopology for AppendGraph {
VertexMap::new(default, |v| v.0, self.vertex_capacity())
}
fn edge_count(&self) -> usize {
self.incidences.len() / 2
}
fn degree(&self, v: Self::Vertex) -> usize {
self.vertices[v.0].incidence_count
}