Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. let string_Of_Opp l=
  2. String.concat ";" ( List.map (Format.sprintf "%c") l)
  3.  
  4. let print_Tuple (e,g,h,l) =
  5. Printf.printf("( %s %d %d [%s] )") e g h (string_Of_Opp l)
  6.  
  7. let rec aStar attente estBut opPoss hEtat n=
  8. List.map print_Tuple attente;
  9. print_newline ();
  10. match attente with
  11. |[]-> failwith "pas de but trouve"
  12. |(e,g,h,l)::reste -> if estBut e then
  13. (e,g,l,n+1,n+1+List.length reste)
  14. else
  15. begin
  16. let fils =creerFils e g opPoss hEtat l in
  17. let newWaitList=
  18. insererLesFils fils reste in
  19. aStar newWaitList estBut opPoss hEtat (n+1)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement