Rewrite ingest command

This commit is contained in:
Joscha 2024-12-31 00:48:24 +01:00
parent f819f5bf69
commit 3aa8222b6b
8 changed files with 502 additions and 242 deletions

View file

@ -196,6 +196,10 @@ impl Graph {
}
}
pub fn add_node(&mut self) {
self.nodes.push(EdgeIdx::new(self.edges.len()));
}
pub fn check_consistency(&self) {
if self.nodes.is_empty() {
assert!(self.edges.is_empty(), "edges must belong to existing nodes");