default source distance infinity
This commit is contained in:
parent
36118c3299
commit
876aa735dc
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ use std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
collections::{hash_map::Entry, HashMap},
|
collections::{hash_map::Entry, HashMap},
|
||||||
env,
|
env,
|
||||||
|
f64::INFINITY,
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ impl Node {
|
||||||
Node {
|
Node {
|
||||||
destinations,
|
destinations,
|
||||||
origin,
|
origin,
|
||||||
source_distance: 0.0,
|
source_distance: INFINITY,
|
||||||
visited: false,
|
visited: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue