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 %3d\n" "Updating estimates" y accum;
- loop (times + 1) (updateestimates est (update pred y true) y graph)) pred (succ accum) ;
- )
- else
- loop 0 est pred (succ accum)
- )
- 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