default source distance infinity

This commit is contained in:
Zynh0722 2024-04-24 08:19:04 -07:00
parent 36118c3299
commit 876aa735dc

View file

@ -9,6 +9,7 @@ use std::{
cell::RefCell,
collections::{hash_map::Entry, HashMap},
env,
f64::INFINITY,
rc::Rc,
};
@ -30,7 +31,7 @@ impl Node {
Node {
destinations,
origin,
source_distance: 0.0,
source_distance: INFINITY,
visited: false,
}
}