From aa372ee41dff36de5cb94fbb677464658eef2e46 Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Wed, 11 Sep 2024 13:35:26 +0400 Subject: chore: extracted theorem checks to separate function --- graph-checker/src/graph.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'graph-checker/src/graph.rs') 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>, } +pub struct GraphProfile { + g6: String, + stats: HashMap, +} + +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, -- cgit v1.2.3