Get graph statistics
(&self)
| 343 | |
| 344 | /// Get graph statistics |
| 345 | pub fn stats(&self) -> GraphStats { |
| 346 | GraphStats { |
| 347 | node_count: self.nodes.len(), |
| 348 | edge_count: self.edges.len(), |
| 349 | node_label_count: self.node_labels.len(), |
| 350 | edge_label_count: self.edge_labels.len(), |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | /// Check if the graph contains a node |
| 355 | pub fn contains_node(&self, node_id: &str) -> bool { |