diff options
| author | Andrew Guschin <guschin.drew@gmail.com> | 2023-05-18 20:57:01 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin.drew@gmail.com> | 2023-05-18 20:57:01 +0400 |
| commit | b294692a8251eb9c4ea8f3e78651d88fc6efd792 (patch) | |
| tree | ab99542dfd9df3a7793f5beb5aa221b9fb14a29c /graph-checker | |
| parent | 3b4759951c3d8f03166da1d26b37ba02b0e066f2 (diff) | |
Some changes in graph-checker
Diffstat (limited to 'graph-checker')
| -rw-r--r-- | graph-checker/src/main.rs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/graph-checker/src/main.rs b/graph-checker/src/main.rs index 351fe42..58b6a1c 100644 --- a/graph-checker/src/main.rs +++ b/graph-checker/src/main.rs @@ -5,11 +5,7 @@ mod graph; use crate::graph::Graph; mod theorems; -use crate::theorems::basic::{ - bondy_chvatal_hamiltonian_cycle, dirac_theorem, ore_theorem, posa_theorem, -}; -use crate::theorems::forbidden; -use crate::theorems::toughness::{theorem15, theorem25}; +use crate::theorems::{basic, forbidden, toughness}; struct Counters { graphs: i32, @@ -54,12 +50,16 @@ fn main() { let start = Instant::now(); let closure = g.get_closure(); let is_complete = closure.is_complete(); + println!("Graph:\n{g}"); + println!("Closure:\n{closure}"); + println!("{is_complete}"); // let toughness = if g.is_complete() { // f64::MAX // } else { // g.get_toughness() // }; + // println!("{toughness}"); // if toughness >= 1.0 { // counters.tough_1 += 1; @@ -69,6 +69,7 @@ fn main() { // } // let min_degree = g.min_degree() as f64; + // println!("{min_degree}"); // TODO: add counter // if forbidden::theorem3_1(&g) { @@ -103,28 +104,31 @@ fn main() { // if forbidden::conjecture17(&g) { // println!("g6:conj17:{}", line); // } + // if forbidden::theorem_all_2con(&g) { + // println!("g6:all_2c:{}", line); + // } - // if theorem15(&g, toughness, min_degree) { + // if toughness::theorem15(&g, toughness, min_degree) { // counters.t15_hamiltonian += 1; // println!("g6:bigalke-jung:{}", line); // } - // if theorem25(&g, toughness, min_degree) { + // if toughness::theorem25(&g, toughness, min_degree) { // counters.t25_hamiltonian += 1; // println!("g6:bauer:{}", line); // } - if dirac_theorem(&g) { - counters.dirac_hamiltonian += 1; - println!("g6:dirac:{}", line); - } + // if basic::dirac_theorem(&g) { + // counters.dirac_hamiltonian += 1; + // println!("g6:dirac:{}", line); + // } - // if ore_theorem(&g) { + // if basic::ore_theorem(&g) { // counters.ore_hamiltonian += 1; // println!("g6:ore:{}", line); // } - // if posa_theorem(&g) { + // if basic::posa_theorem(&g) { // counters.posa_hamiltonian += 1; // println!("g6:posa:{}", line); // } @@ -147,7 +151,7 @@ fn main() { // println!("Included vertices: {:?}", cutset.vertices); // println!("Cutset cardinality: {}", cutset.cardinality); - // let cycle = bondy_chvatal_hamiltonian_cycle(&g); + // let cycle = basic::bondy_chvatal_hamiltonian_cycle(&g); // print!("Hamiltonian cycle: "); // let start = 0; // let mut current = start; |