summaryrefslogtreecommitdiff
path: root/graph-checker/src/main.rs
diff options
context:
space:
mode:
authorAndrew Guschin <guschin@altlinux.org>2024-04-01 00:47:17 +0400
committerAndrew Guschin <guschin@altlinux.org>2024-04-01 00:52:51 +0400
commit950c3cfe266453a2a723c0d490baf1cd330a9c1e (patch)
tree5216eaad2730c631678a1eac8924bfd6a48dedd9 /graph-checker/src/main.rs
parentf7aa97e10a2fbddb76e1893b7deb193ad56e7192 (diff)
feat: replace stdin with geng-generator
Diffstat (limited to 'graph-checker/src/main.rs')
-rw-r--r--graph-checker/src/main.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/graph-checker/src/main.rs b/graph-checker/src/main.rs
index 628ce92..646cca0 100644
--- a/graph-checker/src/main.rs
+++ b/graph-checker/src/main.rs
@@ -1,4 +1,4 @@
-use std::io::{self, BufRead};
+// use std::io::{self, BufRead};
use std::time::Instant;
mod graph;
@@ -7,6 +7,9 @@ use crate::graph::Graph;
mod theorems;
use crate::theorems::{basic, forbidden, toughness};
+mod geng;
+use crate::geng::GengIterator;
+
struct Counters {
graphs: i32,
tough_1: i32,
@@ -56,16 +59,14 @@ impl Counters {
}
fn main() {
- let stdin = io::stdin();
+ let gi = GengIterator::new(4);
let mut time = 0;
let mut counters = Counters::new();
- for line in stdin.lock().lines() {
- let line = line.unwrap();
-
- let g = Graph::from_g6(&line);
+ for g in &gi {
counters.graphs += 1;
+ let line = g.to_g6();
let start = Instant::now();
let closure = g.get_closure();