Add todos

This commit is contained in:
2026-08-29 22:39:45 +02:00
parent 7fbd5eed9d
commit 95601a7a5a
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -149,6 +149,7 @@ impl GraphTopology for AppendGraph {
self.vertices.len()
}
// TODO: Create with capacity 0, maybe offer pre-allocated alternative?
fn vertex_map<T: Clone>(&self, default: T) -> ElementMap<Self::Vertex, T> {
ElementMap::new(default, |v| v.0, self.vertex_capacity())
}
@@ -157,6 +158,7 @@ impl GraphTopology for AppendGraph {
self.incidences.len() / 2
}
// TODO: Create with capacity 0, maybe offer pre-allocated alternative?
fn edge_map<T: Clone>(&self, default: T) -> ElementMap<Self::Edge, T> {
ElementMap::new(default, |e| e.0 / 2, self.edge_capacity())
}
+2
View File
@@ -241,6 +241,7 @@ impl GraphTopology for Graph {
self.vertices.len()
}
// TODO: Create with capacity 0, maybe offer pre-allocated alternative?
fn vertex_map<T: Clone>(&self, default: T) -> ElementMap<Self::Vertex, T> {
ElementMap::new(default, |v| v.arr_idx(), self.vertex_capacity())
}
@@ -249,6 +250,7 @@ impl GraphTopology for Graph {
self.incidences.len() / 2
}
// TODO: Create with capacity 0, maybe offer pre-allocated alternative?
fn edge_map<T: Clone>(&self, default: T) -> ElementMap<Self::Edge, T> {
ElementMap::new(default, |e| e.arr_idx() / 2, self.edge_capacity())
}