From a26981a2669555a61b8d986a888708f72d986100 Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Thu, 10 Oct 2024 19:33:13 +0400 Subject: add batched insert --- graph-checker/src/graph.rs | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'graph-checker/src/graph.rs') diff --git a/graph-checker/src/graph.rs b/graph-checker/src/graph.rs index bb0fb03..cf3dbc0 100644 --- a/graph-checker/src/graph.rs +++ b/graph-checker/src/graph.rs @@ -1,4 +1,5 @@ -use std::collections::{HashMap, HashSet}; +// use std::collections::{HashMap, HashSet}; +use std::collections::HashSet; use std::fmt; #[derive(Clone, PartialEq, Eq)] @@ -7,23 +8,23 @@ 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); - } -} +// 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 { -- cgit v1.2.3