Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (*
  2. Error: This expression has type
  3.          Graph.Pack.Digraph.V.label -> Graph.Pack.Digraph.V.t
  4.        but an expression was expected of type int
  5. *)
  6.  
  7. let fun_general () =
  8.   let ga = read_graph "blog.txt" in
  9.   let g = fst ga in
  10.   let b = snd ga in
  11.   let empty = ref false in
  12.   let first_el = ref 0 in
  13.   while not !empty do
  14.     let res = composanteFC ga b.(!first_el) in
  15.     Queue.iter
  16.       (fun x ->
  17.         b.(x)<- (V.create -1)) res; (* this line has the error *)
  18.     empty:=true;
  19.     let continue = ref true in
  20.     let i = ref 0 in
  21.     while (( !i < (Array.length b)) && !continue ) do
  22.       if ((V.label b.(!i))>0) then
  23.         begin
  24.           empty := false;
  25.           continue := false;
  26.           first_el := !i;
  27.         end;
  28.     done;
  29.   done;
  30. ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement