Performance improvements and fix warnings

This commit is contained in:
hal8174 2024-01-02 23:22:20 +01:00
parent 68d0f64058
commit b5dcbccf02
6 changed files with 202 additions and 55 deletions

View file

@ -1,11 +1,10 @@
use crate::belt_finding::brute_force::BruteforceBuilder;
use crate::graph::wheighted_graph::shortest_path::dijkstra;
use crate::graph::wheighted_graph::WheightedGraph;
use crate::misc::Map;
use crate::priority_queue::BinaryHeap;
use crate::{misc::Map, priority_queue::PriorityQueue};
use colored::{Color, Colorize};
use std::fmt::{write, Display};
use std::io::Write;
use std::fmt::Display;
pub mod brute_force;
@ -42,9 +41,9 @@ impl Direction {
}
}
fn horizontal(&self) -> bool {
!self.vertical()
}
// fn horizontal(&self) -> bool {
// !self.vertical()
// }
fn reverse(&self) -> Self {
match self {