Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let djikstra graph =
- let rec loop times est pred accum =
- if accum <= 25
- then
- if times < 5
- then (
- let (x,y) = mindistance est pred in
- (
- Printf.printf "\n%3s %3d\n" "Updating estimates" y;
- loop (times + 1) (updateestimates est (update pred y true) y graph)) pred times ;
- )
- else
- loop 0 est pred (accum + times)
- else
- est
- in loop 0 (update (estimates 5) 0 (float_of_int 0)) (predecessor 5) 0
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement