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 41f2332735 - Show all commits
+10 -1
View File
@@ -9,7 +9,7 @@ impl From<Vertex> for usize {
}
}
#[derive(Copy, Clone, PartialEq, Eq)]
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct Incidence(usize);
struct VertexIncidenceHeader {
@@ -136,6 +136,15 @@ mod tests {
assert_eq!(graph.vertex_count(), 10, "unexpected vertex count");
}
#[test]
fn add_edge() {
let mut graph = AppendGraph::new();
let v1 = graph.add_vertex();
let v2 = graph.add_vertex();
let e = graph.add_edge(v1, v2);
assert_ne!(graph.add_edge(v1, v2), e, "unexpected duplicate edge");
}
#[test]
fn edge_count_empty() {
let graph = AppendGraph::new();