Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*
- Error: This expression has type
- Graph.Pack.Digraph.V.label -> Graph.Pack.Digraph.V.t
- but an expression was expected of type int
- *)
- let fun_general () =
- let ga = read_graph "blog.txt" in
- let g = fst ga in
- let b = snd ga in
- let empty = ref false in
- let first_el = ref 0 in
- while not !empty do
- let res = composanteFC ga b.(!first_el) in
- Queue.iter
- (fun x ->
- b.(x)<- (V.create -1)) res; (* this line has the error *)
- empty:=true;
- let continue = ref true in
- let i = ref 0 in
- while (( !i < (Array.length b)) && !continue ) do
- if ((V.label b.(!i))>0) then
- begin
- empty := false;
- continue := false;
- first_el := !i;
- end;
- done;
- done;
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement