diff options
| author | Andrew Guschin <guschin@altlinux.org> | 2024-09-11 13:35:26 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin@altlinux.org> | 2024-09-11 13:35:26 +0400 |
| commit | aa372ee41dff36de5cb94fbb677464658eef2e46 (patch) | |
| tree | 7171459bd61f224c243dd56c0bb9ed0daba35dfe /graph-checker/src/graph.rs | |
| parent | 8fb4ba6c422c6941189791a5cc4bfa08d16cb6f9 (diff) | |
chore: extracted theorem checks to separate function
Diffstat (limited to 'graph-checker/src/graph.rs')
| -rw-r--r-- | graph-checker/src/graph.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/graph-checker/src/graph.rs b/graph-checker/src/graph.rs index 67dbb59..a4390d4 100644 --- a/graph-checker/src/graph.rs +++ b/graph-checker/src/graph.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; use std::fmt; #[derive(Clone, PartialEq, Eq)] @@ -7,6 +7,24 @@ pub struct Graph { pub matrix: Vec<Vec<u32>>, } +pub struct GraphProfile { + g6: String, + stats: HashMap<String, bool>, +} + +impl GraphProfile { + pub fn new(g6: &String) -> Self { + Self { + g6: g6.clone(), + stats: HashMap::new(), + } + } + + pub fn insert(&mut self, key: String, value: bool) { + self.stats.insert(key, value); + } +} + #[derive(Clone, PartialEq, Eq, Debug)] pub struct Cutset { pub cardinality: usize, |